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(sheet): sort feature #2435

Merged
merged 75 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
d8a5402
feat: add command & mutation for sheet sort
yuhongz May 13, 2024
7a423e3
feat: register skeleton change if mutation executed
yuhongz May 14, 2024
1e54e7c
feat: plugin schema for compare fn & basic value type compare fn
yuhongz May 15, 2024
8da4812
feat: handle merge cell sort
yuhongz May 16, 2024
bcb7056
feat: extend filter range if set-range-value at nextline
yuhongz May 16, 2024
ead6958
fix: not every srv-mutation extend filter range
yuhongz May 16, 2024
fd076a8
fix: protect unsafe var
yuhongz May 16, 2024
2f2d37f
feat: add some entries
yuhongz May 17, 2024
c1582dd
feat: ui split
yuhongz May 20, 2024
04f5941
feat: split ui and sort-core
yuhongz May 23, 2024
ae82d13
chore: merge to dev
yuhongz May 24, 2024
2760a31
feat: add custom sort panel
yuhongz May 25, 2024
5c3b1ec
feat: add more entry
yuhongz May 25, 2024
f0edf1d
feat: custom sort ui
yuhongz May 28, 2024
22f89f6
feat: polishing sort ui
yuhongz May 29, 2024
d0cd9a4
feat: add sort btn at filter panel
yuhongz May 30, 2024
ed1051b
fix: merge conflicts
yuhongz May 31, 2024
9d6e7c0
chore: lock
yuhongz May 31, 2024
9c289e9
fix: custom panel has max-height
yuhongz Jun 5, 2024
d34a456
test: add test for sort-range-command
yuhongz Jun 5, 2024
6079074
Merge branch 'dev' into yuhongz/sort
yuhongz Jun 6, 2024
6b3d7f7
chore: typo
yuhongz Jun 6, 2024
365375b
chore: type
yuhongz Jun 6, 2024
2e0b590
chore: type
yuhongz Jun 6, 2024
27ba6ea
chore: add version
yuhongz Jun 6, 2024
fbd8653
fix: unneccesary focus
yuhongz Jun 6, 2024
23953fb
chore: lock
yuhongz Jun 6, 2024
6e64b33
chore: react version
yuhongz Jun 6, 2024
c737951
Merge branch 'dev' into yuhongz/sort
yuhongz Jun 7, 2024
b29c7e5
Merge branch 'dev' into yuhongz/sort
yuhongz Jun 11, 2024
a1cc4d5
Merge branch 'dev' into yuhongz/sort
yuhongz Jun 12, 2024
19a7cfa
feat: add locale
yuhongz Jun 12, 2024
b38d31b
chore: disable lint
yuhongz Jun 12, 2024
80240ae
fix: null value compare
yuhongz Jun 13, 2024
0898335
fix: hidden row should not be sorted
yuhongz Jun 13, 2024
9f4b0e4
fix: undo error
yuhongz Jun 13, 2024
ccf6ade
fix: quit dialog when click out side
yuhongz Jun 14, 2024
0708310
feat: custom sort has at least one rule
yuhongz Jun 14, 2024
59ca2d5
Merge branch 'dev' into yuhongz/sort
yuhongz Jun 14, 2024
ab6373b
fix: filter panel error
yuhongz Jun 14, 2024
a38f7fc
fix: should not preserve panel position
yuhongz Jun 14, 2024
dc4a88b
fix: ui
yuhongz Jun 14, 2024
a339adc
feat: add reorder-range mutation/command to sheet
yuhongz Jun 14, 2024
767458b
feat: has title will effect selection & dropdown label
yuhongz Jun 15, 2024
06127a7
feat: add empty check before sort
yuhongz Jun 15, 2024
0929401
feat: add reorderrange to ref-range
yuhongz Jun 15, 2024
385d766
fix: ref-range about reorder-range
yuhongz Jun 15, 2024
99a6e52
fix: cf refresh after reorder
yuhongz Jun 15, 2024
f0cecdb
fix: richformat will be sorted
yuhongz Jun 16, 2024
c5a9114
feat: dv support sort
yuhongz Jun 16, 2024
dca5b34
feat: checkbox will be sorted
yuhongz Jun 16, 2024
3ea720a
feat: single row cannot be sorted
yuhongz Jun 16, 2024
88f89e5
test: fix test
yuhongz Jun 16, 2024
cc63833
chore: type
yuhongz Jun 16, 2024
cfd2714
fix: style
yuhongz Jun 17, 2024
067f9b9
fix: ctx-menu sort disable
yuhongz Jun 18, 2024
e00a9fa
fix: sort by raw cell data
yuhongz Jun 18, 2024
c1c7ae0
fix: reorder-range-mutation will trigger value change rerender
yuhongz Jun 18, 2024
745c402
Merge branch 'dev' into yuhongz/sort
yuhongz Jun 18, 2024
27de4b0
chore: pnpm
yuhongz Jun 18, 2024
84cb2f4
fix: filter panel should not has limited height
yuhongz Jun 18, 2024
fa0b2b6
fix: filter panel height change
yuhongz Jun 18, 2024
293b5cb
fix: ui
yuhongz Jun 18, 2024
e64b56d
fix: autofill will extend filter-range
yuhongz Jun 18, 2024
1451561
fix: cr revise
yuhongz Jun 18, 2024
d771f03
fix: cr revise
yuhongz Jun 18, 2024
38cf184
feat: array-formula will not be sorted
yuhongz Jun 18, 2024
2db2be5
fix: style
yuhongz Jun 19, 2024
c73fa90
fix(conditional-formatting): when multiple conditional formats are se…
Gggpound Jun 19, 2024
1de5ccf
fix: autofill will copy value if single cell
yuhongz Jun 19, 2024
07b19bb
feat: update formula calc
yuhongz Jun 19, 2024
0cb4374
fix: empty cell will not be sorted
yuhongz Jun 19, 2024
b87209e
fix: throttle add new sort rule
yuhongz Jun 19, 2024
01f914e
fix: filter panel trigger sort will not set selection
yuhongz Jun 19, 2024
22d23d5
fix: list ui
yuhongz Jun 19, 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
Prev Previous commit
Next Next commit
fix: unneccesary focus
  • Loading branch information
yuhongz committed Jun 6, 2024
commit fbd8653592ccd61b5f3ca16659f14b7f25c60495
13 changes: 4 additions & 9 deletions examples/src/sheets/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ import { defaultTheme } from '@univerjs/design';
import { UniverDocsPlugin } from '@univerjs/docs';
import { UniverDocsUIPlugin } from '@univerjs/docs-ui';
import { UniverRenderEnginePlugin } from '@univerjs/engine-render';
import { UniverSheetsFilterPlugin } from '@univerjs/sheets-filter';
import { UniverSheetsSortPlugin } from '@univerjs/sheets-sort';
import { UniverSheetsSortUIPlugin } from '@univerjs/sheets-sort-ui';
import type { IUniverRPCMainThreadConfig } from '@univerjs/rpc';
import { UniverRPCMainThreadPlugin } from '@univerjs/rpc';
import { UniverSheetsPlugin } from '@univerjs/sheets';
import { UniverSheetsUIPlugin } from '@univerjs/sheets-ui';
import { UniverUIPlugin } from '@univerjs/ui';
Expand All @@ -33,15 +28,18 @@ import { UniverDebuggerPlugin } from '@univerjs/debugger';
import { UniverSheetsHyperLinkUIPlugin } from '@univerjs/sheets-hyper-link-ui';
import { IThreadCommentMentionDataService, UniverThreadCommentUIPlugin } from '@univerjs/thread-comment-ui';
import { UniverFormulaEnginePlugin } from '@univerjs/engine-formula';
import type { IUniverRPCMainThreadConfig } from '@univerjs/rpc';
import { UniverRPCMainThreadPlugin } from '@univerjs/rpc';
import { UniverSheetsFormulaPlugin } from '@univerjs/sheets-formula';
import { UniverSheetsNumfmtPlugin } from '@univerjs/sheets-numfmt';
import { UniverSheetsZenEditorPlugin } from '@univerjs/sheets-zen-editor';
import { UniverSheetsDataValidationPlugin } from '@univerjs/sheets-data-validation';
import { UniverSheetsDrawingUIPlugin } from '@univerjs/sheets-drawing-ui';
import { FUniver } from '@univerjs/facade';
import { UniverSheetsSortPlugin } from '@univerjs/sheets-sort';
import { UniverSheetsSortUIPlugin } from '@univerjs/sheets-sort-ui';
import { enUS, ruRU, zhCN } from '../locales';
import { DEFAULT_WORKBOOK_DATA_DEMO } from '../data/sheets/demo/default-workbook-data-demo';

/* eslint-disable-next-line node/prefer-global/process */
const IS_E2E: boolean = !!process.env.IS_E2E;

Expand Down Expand Up @@ -92,9 +90,6 @@ univer.registerPlugin(UniverSheetsHyperLinkUIPlugin);
// data validation
univer.registerPlugin(UniverSheetsDataValidationPlugin);

// filter
univer.registerPlugin(UniverSheetsFilterPlugin);

// sort
univer.registerPlugin(UniverSheetsSortPlugin);
univer.registerPlugin(UniverSheetsSortUIPlugin);
Expand Down
6 changes: 3 additions & 3 deletions packages/sheets-sort-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@
"@univerjs/sheets-ui": "workspace:*",
"@univerjs/ui": "workspace:*",
"@wendellhu/redi": "^0.15.2",
"react": "^16.9.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.0 || ^18.0.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"rxjs": ">=7.0.0"
},
"dependencies": {
"@univerjs/icons": "^0.1.55",
"@univerjs/icons": "^0.1.56",
"rc-virtual-list": "^3.11.5"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export class SheetsSortUIController extends RxDisposable {
this._sheetsSortUIService.customSortState$.pipe(takeUntil(this.dispose$)).subscribe((newState) => {
if (newState && newState.show && newState.range) {
this._openCustomSortPanel(newState.range);
} else if (!newState?.show) {
} else if (newState && !newState?.show) {
this._closePanel();
}
});
Expand Down
Loading