iridl / python-maprooms

Dash maprooms and tools
0 stars 4 forks source link

Remic/controls #373

Open remicousin opened 1 year ago

remicousin commented 1 year ago

First step towards more compact controls. First couple commits actual fixes to a proper set up. This is not necessarily prettier but it is more compact. Cards may not be a good choice as the Header+Body takes a lot of space. Labels in FormFloating are nicer (except it seems I can't reduce the amount of white space they generate) but actually apply only to Input, and we would also want some labeling that encompasses more than one control (that Card's Header do well). Benno's fieldsets are doing all that well.

So next step may be to look for something other than Cards... Even though there doesn't seem to be an alternative in dbc. Maybe it's ok... I wish I could squeeze the vertical size of "Pick a Point" and put it in the top banner of the page

aaron-kaplan commented 1 year ago

Please give a working config for testing. I tried a few of the config files from this repo as well as the one from python_maproom_emi and none of them worked.

remicousin commented 1 year ago

I rebased and you can use on emi with that branch for both the emi and iri config files, and then your local config. This builds all Maprooms but the wat_bal one which is installed nowhere anyway and is in dev' in Senegal, and so when I get back to that one I can make sure those changes make sense there too.

remicousin commented 1 year ago

This last commit explores the return of fieldsets for controls. They look very much like Benno's uicore but that's because I took the css from there, and that's because I am too bad in css/html to start from scratch. What I am mostly interested in is its compact aspect. Other looks considerations are wide-open.

The main change between controls and fieldsets is that the Block element uses Fieldset instead of Cards. It's applied to onset maproom only if you want to see what it looks like. There are more changes between controls and fieldsets: a good number of different indenting style; some details in the css of each elements; and the combination of elements (e.g. DataNoYear now uses Select instead of dbc.Select).

I'd still want to put in the top bar the controls that are the smallest, or more generic to all maprooms... maybe all of them now that they are compact... not sure... but it seems a bunch belong there, leaving room for text on the side bar. I also discovered this component that seems to me that it could be taken advantage to add content without eating up space... Not sure which content though... These comments would be for future PRs.

remicousin commented 1 year ago
Screenshot 2023-10-11 at 2 56 28 PM
remicousin commented 1 week ago

Could I merge this? maybe undoing the application of fieldsets to onset's layout (everything before that are improvement on controls, and one can switch as they like between controls and fieldsets) ? Pepsico are paying a lot of attention to looks so I'd like to use fieldsets in their app. So I guess I could also just take fieldsets here and put it in pepsico...