-
Notifications
You must be signed in to change notification settings - Fork 155
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
Sidebar panel extension #10111
Sidebar panel extension #10111
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
07c5c77
to
3cadbd6
Compare
@janackermann @lookacat @JammingBen @dschmidt this PR is not quite done, but I'd like to ask for a critical review of three specific things (+ discussion together in a video call probably). This PR changes the The new The You can have a look at the new interface in action in There is one new component, which is the You can check out the PR and run it, it is already in quite a good shape...
There is a list of |
Do you plan to have something similar like FileSideBar.vue and fileSideBars.ts for web-app-admin-settings as well? |
About the correct place for the sidebar toggle in apps: |
export interface SideBarPanelContext<P, T extends Item> { | ||
parent?: P | ||
items?: T[] | ||
} |
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.
Just some unfiltered thought process:
Do we need the space in the future? I'm a bit torn. On one hand, it's quite files-specific since we don't have a space in the admin-settings e.g. But then again, you could say the same about parent
.
The only reason to add it here would be to have it available in isVisible
and isRoot
, right? Might be helpful if I want my panel to be visible in project spaces only. It could also save us from some of the not-so-nice route checks.
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.
Trying to keep the generic scope, I added a root
field to the context interface and set the space as root
wherever possible. Not using it, yet, but I agree that it makes a whole lot of sense to have the space root available.
@@ -0,0 +1,3 @@ | |||
export interface Item { |
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.
Not a fan of the naming because it's so generic, even if its just there to extend existing interfaces
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.
this interface indeed as generic as it can get, so I kind of like the name... do you have an idea for a better name? open for suggestions!
The reason why I introduced the interface is to be able to always require an id
property on the items in a sidebar panel context.
This comment was marked as outdated.
This comment was marked as outdated.
fbb4d68
to
294647c
Compare
86bf0ab
to
4200b4d
Compare
7869863
to
fff2c86
Compare
This comment was marked as outdated.
This comment was marked as outdated.
45091a4
to
73f3cca
Compare
b3d4ee4
to
6ef6be1
Compare
712e6e4
to
705a08a
Compare
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.
LGTM 👍
There are still some occurrences of fileSideBars
in the code base, we should deprecate/remove them in a follow-up.
705a08a
to
8c1a51f
Compare
SonarCloud Quality Gate failed. 3 Bugs 48.6% Coverage Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
* feat: introduce sidebar panels as extension point --------- Co-authored-by: Dominik Schmidt <[email protected]> Co-authored-by: Jannik Stehle <[email protected]>
😍 😍 😍 |
* feat: introduce sidebar panels as extension point --------- Co-authored-by: Dominik Schmidt <[email protected]> Co-authored-by: Jannik Stehle <[email protected]>
Description
This PR introduces a new extension point
sidebarPanel
, which allows apps to register additional panels for the right sidebar. It also extracts the right sidebar that was specific to thefiles
app into a genericFileSideBar
component which lives in theweb-pkg
package. TheFileSideBar
is then used in all viewer and editor apps so far to display a right sidebar with thefiles
sidebar panels which were registered by thefiles
app. I.e. panels live inweb-app-files
, but are used in any viewer/editor app as well.Related Issue
Motivation and Context
Provide files app functionality like viewing file details, sharing, etc, directly in viewers and editors. Make it possible for viewer/editor apps to bring their own right sidebar panels and display them along the other files app sidebar panels.
Types of changes
Checklist:
Open tasks:
AppWrapper
inpreview
app or embed theFileSideBar
directly in the preview apppanzoom
-bug in preview app when navigating through images with open sidebar