-
Notifications
You must be signed in to change notification settings - Fork 9
fix: Hide Right Sidebar When Model Editor Form is Active #198
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
base: main
Are you sure you want to change the base?
Conversation
Unit Test Results75 tests 75 ✅ 14s ⏱️ Results for commit 33fbe47. |
Unit Test Results75 tests 75 ✅ 15s ⏱️ Results for commit 92c86fb. ♻️ This comment has been updated with latest results. |
|
@remonaadite009 Thanks for the change, but I think this approach is a bit to brutal. Also we want the side bar to remain visible, only the properties panel to minimize again (as if you clicked on the properties icon in the right sidebar). I would asume there is already a method for closing the panel within the Theia classes somewhere (the same method as that properties icon is calling on click). hide-property-pane.mp4 |
I actually tried the approach you mentioned, but the issue is that when the sidebar remains visible, users can still click on the properties panel again, which brings back the same sync issue. That’s why I decided to hide the sidebar itself, to make sure the sync problem doesn’t occur. |
But if you prefer, I can keep the sidebar visible and just make sure the properties panel stays closed instead. |
The goal was only to close the properties panel. If a user wants to open it again that's fine. I also think when the focus is on the form the properties panel should be empty, since the form has no content on the property widget. |
|
As discussed, let's not collapse the property widget as part of this issue. The core issue is the property widget not being rendered correctly for the composite editor. The behaviour should be equal to the stock Monaco Editor in Theia (so when you open any file with right click 'Open With' > 'Text editor'). |
88eb737 to
dce95ea
Compare
|
Hi, Open a diagram → click an entity → click Open → the right-hand property panel shows standard file properties |
|
Hi , Please review and give feedback. |
b217ba2 to
2788a7c
Compare
…ects Updated existing integrated system diagram editor to use the shared open method.
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.
@remonaadite009 I reviewed the changes and added some comments. I also rebased this branch on main and updated the playwright test in a separate commit.
| } | ||
|
|
||
| async updatePropertyViewContent(propertyDataService?: PropertyDataService, selection?: GlspSelection | undefined): Promise<void> { | ||
| const selectionData = selection as any; |
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 did you need to add this part in the code?
| } | ||
|
|
||
| if (renderData && selection) { | ||
| this.shell.expandPanel('right'); |
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.
Should we expand a panel here?
| } else { | ||
| this.renderData = undefined; | ||
| this.setModel(); | ||
| await this.setModel(); |
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.
I am wondering whether doing async update isn't better.
| if (this.document?.uri.toString() !== renderData?.uri || !deepEqual(this.renderData, renderData)) { | ||
| this.renderData = renderData; | ||
| this.setModel(renderData?.uri); | ||
| await this.setModel(renderData?.uri); |
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.
I am wondering whether doing async update isn't better.
| return { ...super.getRenderProperties(), ...this.renderData?.renderProps }; | ||
| } | ||
|
|
||
| override render(): React.ReactNode { |
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.
The super method contains the same logic, but then in reverse, where if there is nothing it adds the div. Do we need this?
This update completely hides the right sidebar (including the tables icon toggle) whenever the model editor form is open.
Changes Made
CSS (index.css) – Added rules to hide the right panel elements when the hide-right-sidebar class is applied to the body.
Widget Lifecycle (model-widget.tsx) – Added logic to dynamically add or remove this class based on the widget’s active state.
Hide the entire right sidebar (including toggle button) when the model editor form is active. Sidebar visibility is restored when switching to other views or closing the form editor.