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

feat(JSONTree): allow case insensitive search #1735

Merged
merged 3 commits into from
Dec 5, 2024
Merged

Conversation

Raubzeug
Copy link
Contributor

@Raubzeug Raubzeug commented Dec 5, 2024

Closes #1567

Stand

CI Results

Test Status: βœ… PASSED

πŸ“Š Full Report

Total Passed Failed Flaky Skipped
208 208 0 0 0

😟 No changes in tests. πŸ˜•

Bundle Size: βœ…

Current: 65.97 MB | Main: 65.97 MB
Diff: +3.00 KB (0.00%)

βœ… Bundle size unchanged.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • πŸ“Š indicates links to detailed reports.
  • πŸ”Ί indicates increase, πŸ”½ decrease, and βœ… no change in bundle size.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 10 changed files in this pull request and generated 1 suggestion.

Files not reviewed (5)
  • src/components/JSONTreeWithSearch/JSONTreeWithSearch.scss: Language not supported
  • src/components/JSONTreeWithSearch/i18n/en.json: Language not supported
  • src/containers/Tenant/Diagnostics/Describe/Describe.scss: Language not supported
  • src/containers/Tenant/Query/QueryResult/components/QueryJSONViewer/QueryJSONViewer.scss: Language not supported
  • src/utils/constants.ts: Evaluated as low risk

src/components/JSONTreeWithSearch/JSONTreeWithSearch.tsx Outdated Show resolved Hide resolved
treeClassName?: string;
}

export function JSONTreeWithSearch({treeClassName, ...rest}: JSONTreeWithSearchProps) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe we could create JSONTreeWrapper and use it everywhere with search prop?
In case we want to use search anywhere else

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Make sense!

ignoreCase: !caseSensitiveSearch,
}}
searchOptions={{
debounceTime: 300,
Copy link
Collaborator

Choose a reason for hiding this comment

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

const DEBOUNCE_TIME ?

@@ -46,6 +47,7 @@ export const DEFAULT_USER_SETTINGS = {
[AUTOCOMPLETE_ON_ENTER]: true,
[IS_HOTKEYS_HELP_HIDDEN_KEY]: false,
[AUTO_REFRESH_INTERVAL]: 0,
[CASE_SENSITIVE_JSON_SEARCH]: false,
Copy link
Collaborator

Choose a reason for hiding this comment

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

looks like global option but as far as I see JSONTree used in many places

image

Copy link
Collaborator

Choose a reason for hiding this comment

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

I suppose case-sensitiveness should be scoped to JSONTreeWrapper (or JSONTreeSearch or whatever component it is used in)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a setting that should be saved to LS. Thats why it is among other settings. Or I didn't get you?..

@Raubzeug Raubzeug requested a review from astandrik December 5, 2024 10:08
@Raubzeug Raubzeug added this pull request to the merge queue Dec 5, 2024
Merged via the queue into main with commit d4845d3 Dec 5, 2024
7 checks passed
@Raubzeug Raubzeug deleted the json-tree-search branch December 5, 2024 13:06
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.

Make search in describe case-insensitive
2 participants