-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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(electron): multi tabs support #7440
base: canary
Are you sure you want to change the base?
Conversation
Your org has enabled the Graphite merge queue for merging into canaryAdd the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 1eb7408. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 6 targets
Sent with 💌 from NxCloud. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## canary #7440 +/- ##
==========================================
- Coverage 57.19% 56.45% -0.74%
==========================================
Files 937 949 +12
Lines 41612 42264 +652
Branches 4781 4930 +149
==========================================
+ Hits 23799 23860 +61
- Misses 17456 18047 +591
Partials 357 357
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
804b9cb
to
c5548bd
Compare
8ad9cfa
to
1b5027c
Compare
1a8ee68
to
4b622ef
Compare
a91ca88
to
5f97f19
Compare
packages/frontend/component/src/ui/scrollbar/use-has-scroll-top.tsx
Outdated
Show resolved
Hide resolved
014a765
to
010ad31
Compare
packages/frontend/core/src/components/root-app-sidebar/index.tsx
Outdated
Show resolved
Hide resolved
010ad31
to
0fd21d5
Compare
0fd21d5
to
1eb7408
Compare
</button> | ||
|
||
{viewIdx !== workbench.views.length - 1 ? ( | ||
<div className={styles.splitViewSeparator} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not border
activeView$ = LiveData.computed(get => { | ||
const activeIndex = get(this.activeViewIndex$); | ||
const views = get(this.views$); | ||
return views[activeIndex]; | ||
return views[activeIndex]; // todo: this could be null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it's hard to fix default active view index to 0, I perfer not persisting it, we can still get all tabs back though
@@ -206,18 +206,27 @@ const DetailPageImpl = memo(function DetailPageImpl() { | |||
[jumpToPageBlock, docCollection.id, openPage, jumpToTag, workspace.id] | |||
); | |||
|
|||
const [container, setContainer] = useState<HTMLElement | null>(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not useRef
@@ -20,12 +13,12 @@ export function useHasScrollTop(ref: RefObject<HTMLElement> | null) { | |||
} | |||
} | |||
|
|||
container.addEventListener('scroll', updateScrollTop); | |||
container?.addEventListener('scroll', updateScrollTop); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debounce
subscription(); | ||
// subscription on quit sometimes crashes the app | ||
try { | ||
subscription(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unsubscribe
?.split('=')[1], | ||
windowName: | ||
process.argv.find(arg => arg.startsWith('--window-name='))?.split('=')[1] ?? | ||
'unknown', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe ${schema}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool
use https://www.electronjs.org/docs/latest/api/web-contents-view to serve different tab views
added tabs view manager in electron to handle multi-view actions and events.