Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(UserSettings): fix highlight on search #972

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

artemmufazalov
Copy link
Member

@artemmufazalov artemmufazalov commented Jul 2, 2024

Screenshot 2024-07-02 at 18 25 32

Comment on lines +27 to +36
<Settings.Item key={setting.title} {...setting}>
{setting.content}
</Settings.Item>
);
}
return <Setting key={setting.settingKey} {...setting} />;
return (
<Settings.Item key={setting.title} {...setting}>
<Setting {...setting} />
</Settings.Item>
);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, there was I problem, that if Settings.Item was not a direct child of Settings.Section, title was not rendered properly. To fix this, I mistakenly used highlightedTitle, so search didn't highlight anything

@@ -31,7 +31,7 @@ const defaultUserSettings = settings;

defaultUserSettings[2].sections[0].settings.push({
title: i18n('settings.useClusterBalancerAsBackend.title'),
helpPopoverContent: i18n('settings.useClusterBalancerAsBackend.popover'),
description: i18n('settings.useClusterBalancerAsBackend.popover'),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced helpPopoverContent with description and removed popovers, so all settings now will look similar (like Editor section)

Screenshot 2024-07-02 at 18 07 35

Screenshot 2024-07-02 at 18 07 39

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about move description to the right section? It's more place there.
Screenshot 2024-07-03 at 08 52 11

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good. However, I'd prefer to do it further, since it's not just an option in uikit component and requires some coding, and now we have quite enough space to display everything without scroll. Added issue to discuss it later: #974

@artemmufazalov artemmufazalov force-pushed the settings-fix-highlight branch from 5b0da1a to 3348b27 Compare July 2, 2024 15:26
@artemmufazalov artemmufazalov marked this pull request as ready for review July 2, 2024 15:26
@artemmufazalov artemmufazalov requested a review from Raubzeug July 2, 2024 15:26
@@ -31,7 +31,7 @@ const defaultUserSettings = settings;

defaultUserSettings[2].sections[0].settings.push({
title: i18n('settings.useClusterBalancerAsBackend.title'),
helpPopoverContent: i18n('settings.useClusterBalancerAsBackend.popover'),
description: i18n('settings.useClusterBalancerAsBackend.popover'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about move description to the right section? It's more place there.
Screenshot 2024-07-03 at 08 52 11

@artemmufazalov artemmufazalov force-pushed the settings-fix-highlight branch from 3348b27 to 7f38d6a Compare July 3, 2024 10:07
@artemmufazalov artemmufazalov merged commit 6fbd52c into main Jul 3, 2024
4 checks passed
@artemmufazalov artemmufazalov deleted the settings-fix-highlight branch July 3, 2024 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants