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

refactor(core): new back&forward button base on workbench #6012

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

EYHN
Copy link
Member

@EYHN EYHN commented Mar 5, 2024

feature:

In Browser:

  • hidden back&forward button in sidebar.
  • back and forward is equal with window.history.back() window.history.forward()

In Desktop:

  • Back and forward can be controlled through the sidebar, cmdk, and shortcut keys.
  • back and forward act on the currently active view.
  • buttons change disable&enable style based on current active view history

Refactor:

Move app-sidebar and app-container from @affine/component to @affine/core

Copy link

graphite-app bot commented Mar 5, 2024

Your org has enabled the Graphite merge queue for merging into canary

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

You can enable merging using labels in your Graphite merge queue settings.

Copy link
Member Author

EYHN commented Mar 5, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @EYHN and the rest of your teammates on Graphite Graphite

@github-actions github-actions bot added mod:infra Environment related issues and discussions mod:component mod:store test Related to test cases app:core labels Mar 5, 2024
@EYHN EYHN force-pushed the eyhn/refactor/back-and-forward-button branch from 0636a24 to 57f2c10 Compare March 5, 2024 05:35
@EYHN EYHN marked this pull request as ready for review March 5, 2024 05:35
@EYHN EYHN force-pushed the eyhn/refactor/back-and-forward-button branch from 57f2c10 to 2793efb Compare March 5, 2024 05:36
Copy link

nx-cloud bot commented Mar 5, 2024

@EYHN EYHN requested review from CatsJuice and pengx17 March 5, 2024 05:38
Copy link

codecov bot commented Mar 5, 2024

Codecov Report

Attention: Patch coverage is 2.87770% with 135 lines in your changes are missing coverage. Please review.

Project coverage is 61.64%. Comparing base (b06aeb2) to head (7c76c25).

Files Patch % Lines
...kages/frontend/core/src/utils/navigable-history.ts 0.00% 67 Missing ⚠️
...src/modules/navigation/view/navigation-buttons.tsx 3.33% 29 Missing ⚠️
.../core/src/modules/navigation/entities/navigator.ts 0.00% 18 Missing ⚠️
...ontend/core/src/modules/workbench/entities/view.ts 0.00% 7 Missing ⚠️
...d/core/src/modules/workbench/entities/workbench.ts 0.00% 6 Missing ⚠️
...avigation/view/use-register-navigation-commands.ts 0.00% 3 Missing ⚠️
...core/src/modules/workbench/view/desktop-adapter.ts 0.00% 3 Missing ⚠️
...rc/components/app-sidebar/sidebar-header/index.tsx 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           canary    #6012      +/-   ##
==========================================
- Coverage   62.49%   61.64%   -0.86%     
==========================================
  Files         436      460      +24     
  Lines       20863    21267     +404     
  Branches     1833     1882      +49     
==========================================
+ Hits        13039    13110      +71     
- Misses       7605     7935     +330     
- Partials      219      222       +3     
Flag Coverage Δ
server-test 71.04% <ø> (-0.13%) ⬇️
unittest 40.61% <2.87%> (-1.22%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

pengx17 commented Mar 5, 2024

It seems history back/forward with keyboard shortcut does not work well.

Copy link

graphite-app bot commented Mar 5, 2024

Merge activity

@EYHN EYHN force-pushed the eyhn/refactor/back-and-forward-button branch from 2793efb to 4285733 Compare March 5, 2024 06:56
# feature:

## In Browser:
- hidden back&forward button in sidebar.
- back and forward is equal with `window.history.back()` `window.history.forward()`

## In Desktop:
- Back and forward can be controlled through the sidebar, cmdk, and shortcut keys.
- back and forward act on the currently **active** view.
- buttons change disable&enable style based on current active view history

# Refactor:

Move app-sidebar and app-container from @affine/component to @affine/core
@Brooooooklyn Brooooooklyn force-pushed the eyhn/refactor/back-and-forward-button branch from 4285733 to 7c76c25 Compare March 5, 2024 07:01
@graphite-app graphite-app bot merged commit 7c76c25 into canary Mar 5, 2024
39 of 42 checks passed
@graphite-app graphite-app bot deleted the eyhn/refactor/back-and-forward-button branch March 5, 2024 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app:core mod:component mod:infra Environment related issues and discussions mod:store test Related to test cases
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

6 participants