This is maybe more a css question that an Ignition one.
I've a class on a view that change dynamically in function of the view is extended or not (See yellow Highlight).
Style class in the advanced stylesheet:
Would it be possible from that class to change the left and margin surrounded in blue on the first picture.
I've a left menu set as shared dock view. this menu can be expand by the operator to show more information's.
Before i used the alterDock scripting function to do that but when navigate to another page the dock come back to the original configuration.
so i create two style class in the advanced stylesheet (leftMenuDockClosed and Opened) and in function if the operator ask for the menu to be expanded or not i bind to the class property on the root container the correct class.
This work great but when the menu is expanding the main view and Header (Top dock) are covered. i would like to make it push the data instead. That's why i'm looking to change the left property and margin but those are in completely different views (Therefore in completely different elements).
So i would like that the custom style class change the style of the element where the call is made but also element from other views.
Yeah, i found this completely non sense to not be able to alter a dock on session level instead of only page by page. At least for the shared one...
But my solution is actually working and the dock stays open even when navigate to a new page.
If you are ok with the dock covering a part of your page (like the cover mode on the dock config).
We prefer the push mode this add some difficulties when you want to do it the custom way and not using the build it option .
Do you mean that the menu in the dock is expanded, or the dock is expanded ?
Can you show screenshots of both states, and tell us more about how the operator interacts with it ?
I mean, what's the mechanism that expands/collapses the menu ?
I kinda feel like this shouldn't cause that much trouble
I've had similar trouble on a bottom "announcement" dock. I wanted it to appear if there was a new announcement but let the user hide it with a Got it! button. I was using system.perspective.open/close/alterDock but it would reset after each page load. I tied the status to a session variable but the best that would happen was the docked view would transition in and out, pushing the page up for a couple of seconds. I haven't got a fix yet.
When opening the session the menu is a bar of -+100px and only show the icons. The user can open it with the arrow on top of it.
Then we show more data. but since i want the user to choose if he want the menu to stay always open, i don't want the menu to cover the data on the header and on the central view.
But since the Menu, header and the central view are separate views this is more complicated to style it out from a central point like the Advanced stylesheet and make it also dynamic.
while it could be possible to do with css...
you might have a better time first trying something else.
alterdock doesnt seem to get saved, but what if you have two dock views? does that get saved?
the second view just being the same but bigger? both set too on ondemand, content push
This was a clever hack. the transition stay the same but I have the same behavior.
FYI: you cannot have two time the same view as dock on the same side. so I create a menu view, then embedded that view into a small and large view and use those views as dock.
You say that this was possible to do with css.
Do you have any direction in witch i can go further to do this with CSS.
So as reminder i have:
A view ("LeftMenu") set as the left dock in the shared settings
A view ("Header") set as the top dock in the shared settings
A main view set as the primary view for each page url.
The expand function is done like this:
A custom property can be set set to true or false in the "LeftMenu" view. In function of that a class is set by binding to the root container of that view what allow me to change the width of the view. Those classes are defined into the advanced style sheet.
My goal was into the two .psc define how much the top and main view should go left so i can push the data more or less to the left.
But since those classes are called into the Left dock view i don't know if we are able to change the property of other views or if we are just limited to the view where the class is used.
Like i said it wont be an easy task, since the menu's seem to be scripted as "containts" and not as flex.
so you'll might have to change that in css...
But a very very new (so it might not work on all devices (works on chrome105+)) css selector is :has()
these are some selectors which you might be able to use
Here me go.
After analyse on how ignition is changing the CSS code when using the onboard functionalities, i've found a working code.
The two last line modify the position of my top dock and the central view of 310px to the left when the leftMenuDockOpened class is present.
As for the moment this seems only to be working with chrome and Edge. I will try to debug on the firefox later.
if you have a bottom dock you should add a extra line to take care of that one also.
@victordcq your nickname CSS king fit you well @Transistor maybe it will help you also
For the moment this is not fully supported by Firefox so you need to enable it manually. On my windows machine, this doesn't seems to change anything. i will continue to debug and let you know if i find something