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: search and replace in table mode #415

Merged
merged 27 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
2f22217
chore: move search logic from TreeMode to SearchBox
josdejong Mar 7, 2024
eb23ed2
chore: move SearchBox to /components/controls
josdejong Mar 7, 2024
ac8ad4d
fix: disable search when SearchBox is not visible
josdejong Mar 7, 2024
66305eb
chore: clear searchResult when closing the SearchBox
josdejong Mar 7, 2024
ea53d83
feat: implement search and replace in TableMode (WIP)
josdejong Mar 7, 2024
e338571
chore: update test snapshot
josdejong Mar 7, 2024
f0cba42
Merge branch 'main' into feat/table-mode-search
josdejong Mar 8, 2024
63efe19
fix: circular dependency
josdejong Mar 9, 2024
4ee3916
chore: fix linting issues
josdejong Mar 11, 2024
4740151
chore: improve performance by filtering search results per row first
josdejong Mar 11, 2024
61aa26c
chore: reorder CSS properties of jse-contents
josdejong Mar 11, 2024
c53e919
fix: insert space above the contents for the SearchBox in tree mode s…
josdejong Mar 11, 2024
e66c639
fix: implement a searchbox offset allowing to scroll up when the Sear…
josdejong Mar 11, 2024
9b351c6
feat: in table mode search, do not search in the column names
josdejong Mar 12, 2024
116cc25
feat: improve performance of search with columns
josdejong Mar 12, 2024
6f2789c
feat: improve performance of search with columns
josdejong Mar 12, 2024
15db5dc
feat: minor performance improvement of search with columns
josdejong Mar 12, 2024
0de9c3b
fix: searching icon is visible again
josdejong Mar 12, 2024
ebb4811
fix: vertical alignment of search icon in the SearchBox
josdejong Mar 12, 2024
658c8aa
chore: cleanup console.time for performance testing
josdejong Mar 12, 2024
79d8cd8
fix: improve `scrollTo` in table mode
josdejong Mar 12, 2024
d2a1339
fix: do not focus search results when opening the SearchBox again wit…
josdejong Mar 12, 2024
58d3b29
chore: minor simplification in the styling
josdejong Mar 12, 2024
8007e44
fix: editor not getting focus when clicking on an `InlineValue` in ta…
josdejong Mar 12, 2024
165b7e3
fix: replace not moving focus to the next search result
josdejong Mar 13, 2024
4c3ce35
fix: enable pressing "Enter" in the "Replace" box to replace the next…
josdejong Mar 13, 2024
f3a9693
fix: linting issue
josdejong Mar 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions src/lib/components/__snapshots__/JSONEditor.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,33 @@ exports[`JSONEditor > render table mode 1`] = `



</svg>
<!--&lt;Svg&gt;-->
<!--&lt;Icon&gt;-->

</button>

<button
class="jse-button jse-search s-kJert7_5e4tU"
title="Search (Ctrl+F)"
type="button"
>
<svg
aria-label=""
class="fa-icon s-T5YyQewRBd7n"
height="16"
role="presentation"
style=""
version="1.1"
viewBox="0 0 512 512"
width="16"
>
<path
d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"
/>



</svg>
<!--&lt;Svg&gt;-->
<!--&lt;Icon&gt;-->
Expand Down Expand Up @@ -211,6 +238,13 @@ exports[`JSONEditor > render table mode 1`] = `
/>
</label>

<div
class="jse-search-box-container s-kw5t6hk3mCrZ"
>

<!--&lt;SearchBox&gt;-->
</div>

<div
class="jse-contents s-kw5t6hk3mCrZ"
>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../../styles';
@import '../../styles';

$search-size: 28px;
$button-width: 20px;
Expand Down Expand Up @@ -78,15 +78,13 @@ $input-min-width: 50px;
display: flex;
align-items: center;
position: relative;
padding-left: $padding-section-left;

.jse-search-icon {
color: inherit;
cursor: inherit;
background: inherit;
position: absolute;
top: $padding-half;
left: $padding-half;
width: $padding-section-left;
text-align: center;
}

label.jse-search-input-label {
Expand Down
Loading
Loading