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

Nested search #2171

Merged
merged 28 commits into from
Jan 24, 2025
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
93060ae
Add API for nested search
DmitryAstafyev Jan 8, 2025
2320787
Add UI and IPC for nested search
DmitryAstafyev Jan 8, 2025
9879691
Returning both indexes (position in stream and search)
DmitryAstafyev Jan 9, 2025
f9afaed
Update view on nested search
DmitryAstafyev Jan 9, 2025
12d90d3
Allow reverse nested search
DmitryAstafyev Jan 9, 2025
c51b117
Add support of hotkeys
DmitryAstafyev Jan 10, 2025
5d9d84d
Add some documentation
DmitryAstafyev Jan 10, 2025
be91bcd
Add missed documentation
DmitryAstafyev Jan 10, 2025
7ed6848
Resolve clippy warnings and errors
DmitryAstafyev Jan 10, 2025
7729cf7
Add related Jasmine test
DmitryAstafyev Jan 10, 2025
87924a2
Upgrade Angular from 16.x to 19.x
DmitryAstafyev Jan 13, 2025
2a8a64d
Restore dark theme
DmitryAstafyev Jan 13, 2025
1eeae5e
Resolve linting issues (clippy + eslint)
DmitryAstafyev Jan 13, 2025
2594103
Reduce render actions of session update
DmitryAstafyev Jan 15, 2025
888bfd9
Fix bootstrap on app loading
DmitryAstafyev Jan 15, 2025
649fe41
Remove debug logs
DmitryAstafyev Jan 15, 2025
d3f9e7c
Optimization for stepping between matches
DmitryAstafyev Jan 15, 2025
cb7b25d
Fix bootstrap issue (Angular scope)
DmitryAstafyev Jan 16, 2025
05728d9
Add hotkey support for nested search
DmitryAstafyev Jan 16, 2025
f6726e9
Upgrade wasm-binding pkg
DmitryAstafyev Jan 16, 2025
0abbab3
Resolve lint issue
DmitryAstafyev Jan 16, 2025
95e955f
Resolve TS linting issue
DmitryAstafyev Jan 16, 2025
ea90dd9
Resolve getting shells issue
DmitryAstafyev Jan 17, 2025
89b06c1
Add support for escape key to close search
DmitryAstafyev Jan 22, 2025
0b6e680
Add menu item; update highlight styling
DmitryAstafyev Jan 22, 2025
0c6422f
Shift search position based on update cursor
DmitryAstafyev Jan 22, 2025
4b13dd0
Resolve "slow" show/close issue
DmitryAstafyev Jan 22, 2025
7ab2ae5
Add unit test for LineSearcher
DmitryAstafyev Jan 24, 2025
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
Prev Previous commit
Next Next commit
Add related Jasmine test
  • Loading branch information
DmitryAstafyev committed Jan 10, 2025
commit 7729cf7a166e21eda6ceed2d7caa20753eece6fe
3 changes: 2 additions & 1 deletion application/apps/rustcore/ts-bindings/spec/defaults.json
Original file line number Diff line number Diff line change
@@ -112,7 +112,8 @@
"4": "Test 4. Assign & single not case sensitive search",
"5": "Test 5. Assign & single word search",
"6": "Test 6. Assign & single search with crossing terms",
"7": "Test 7. Assign & repeated search"
"7": "Test 7. Assign & repeated search",
"8": "Test 8. Assign & search and nested search"
}
}
},
56 changes: 56 additions & 0 deletions application/apps/rustcore/ts-bindings/spec/session.search.spec.ts
Original file line number Diff line number Diff line change
@@ -786,4 +786,60 @@ describe('Search', function () {
});
});
});

it(config.regular.list[8], function () {
return runners.withSession(config.regular, 8, async (logger, done, comps) => {
const tmpobj = createSampleFile(
5000,
logger,
(i: number) =>
`[${i}]:: ${
i % 100 === 0 || i <= 5
? `some match line ${i % 500 === 0 ? 'Nested' : ''} data\n`
: `some line ${i % 500 === 0 ? 'Nested' : ''} data\n`
}`,
);
comps.stream
.observe(
new Factory.File()
.asText()
.type(Factory.FileType.Text)
.file(tmpobj.name)
.get()
.sterilized(),
)
.on('processing', () => {
comps.search
.search([
{
filter: 'match',
flags: { reg: true, word: false, cases: false },
},
])
.then((_) => {
comps.search
.searchNestedMatch(
{
filter: 'Nested',
flags: { reg: true, cases: false, word: false },
},
10,
false,
)
.then((pos: [number, number] | undefined) => {
expect((pos as [number, number])[0]).toBe(500);
expect((pos as [number, number])[1]).toBe(10);
finish(comps.session, done);
})
.catch(finish.bind(null, comps.session, done));
})
.catch(finish.bind(null, comps.session, done));
})
.catch(finish.bind(null, comps.session, done));
let searchStreamUpdated = false;
comps.events.SearchUpdated.subscribe((event) => {
searchStreamUpdated = true;
});
});
});
});
Loading