Skip to content

Layout bugs#1246

Merged
pngwn merged 3 commits into
mainfrom
layout-bugs
May 13, 2022
Merged

Layout bugs#1246
pngwn merged 3 commits into
mainfrom
layout-bugs

Conversation

@pngwn
Copy link
Copy Markdown
Member

@pngwn pngwn commented May 13, 2022

Okay.

Closes #1233. Closes #1237. Closes #1238.

  • [blocks_plug] TabItems needs a gr.Row to proper render #1237 was just a classic bug/ oversight.
  • [blocks_flashcards] Row styles and conditional Row issues #1233 visible=True|False wasn't working as we had switched out styling to a new system, reimplemented.
  • tweaked the mobile styles for form grouping, so they work when we are in asmaller screen view (where columns collapse into rows)
  • added a style option to Row (mobile_collapse) so that users can disable the mobile collumn collapsing. This is important because we use flex for everything and need to switch this off for some small elements, like buttons, that we want to appear side by side even on mobile (such as the 'Clear' and 'Submit' buttons in interface)
  • added a style option to Button (full_width) as buttons will not fill the width of their container typically (which is good but sometimes it is needed for certain layouts).
  • tweaked a demo to make it a bit nicer.
  • The layout stuff was a bit more involved ([blocks_flashcards] Row styles and conditional Row issues #1233 and Smaller screen layout has collapsed rows  #1238):
    I had to rethink how we were handling layouts as it was causing a number of issue. I think we were adding more and more classes to workaround issues that were arising and it was becoming difficult to manage all of the different case. I decided to go backa nd clean up a little by removing some of the probl;ematic classes and relying on things being full width (which will cause them to flex correctly most of the time), rather than tweaking the flex properties of the individual children.

I've tested this pretty extensively across screensizes here are some screengrabs showing current behaviour:

Screen.Recording.2022-05-13.at.14.02.50.mov
Screen.Recording.2022-05-13.at.15.10.22.mov

@pngwn
Copy link
Copy Markdown
Member Author

pngwn commented May 13, 2022

I need to continue so I am going to merge this. @radames @abidlabs If you could test some more demos when you get the chance just to make sure this resolve all issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant