Introduce SidePanelLayout and SideDialog (3901)#5027
Conversation
|
|
||
| @Tag("jmix-side-panel-layout-closer") | ||
| @JsModule("./src/side-panel-layout/jmix-side-panel-layout-closer.js") | ||
| public class JmixSidePanelLayoutCloser extends Button { |
There was a problem hiding this comment.
Let's not extent the Button component, since we don't use all its API. Component is enough.
|
|
||
| @Override | ||
| protected void onClick(ClickEvent<Button> event) { | ||
| super.onClick(event); |
There was a problem hiding this comment.
I really don't like that we close side panel from server side. It makes the Web-component serve the purpose of custom html tag.
I'd like that we close side panel on client side same as DrawerToggle component and SidePanelLayout listens to opened state of client side and react accordingly on server side.
| * @param listener listener to add | ||
| * @return a registration for removing the listener | ||
| */ | ||
| public Registration addModalityCurtainClickListener(ComponentEventListener<ModalityCurtainClickEvent> listener) { |
There was a problem hiding this comment.
I see no reason to have all event related code to be implemented in the SidePanelLayout instead of the base class, except having SidePanelLayout in the event type which is insignificant
| public class DialogClosedEvent extends ApplicationEvent { | ||
|
|
||
| public DialogClosedEvent(Dialog dialog) { | ||
| public DialogClosedEvent(Component dialog) { |
There was a problem hiding this comment.
Looks like you don't need these changes
| /** | ||
| * Represents the placement of the side panel relative to the main content. | ||
| */ | ||
| public enum SidePanelPlacement { |
| /** | ||
| * The side panel pushes the content. | ||
| */ | ||
| PUSH |
There was a problem hiding this comment.
Replaced by Boolean property sidePanelOverlay
No description provided.