Skip to content

BGDIINF_SB-2748: Add selection feedback in topics.#397

Merged
jedef merged 4 commits intodevelopfrom
bugfix-BGDIINF_SB-2748-add-selection-feedback-in-topics
Apr 5, 2023
Merged

BGDIINF_SB-2748: Add selection feedback in topics.#397
jedef merged 4 commits intodevelopfrom
bugfix-BGDIINF_SB-2748-add-selection-feedback-in-topics

Conversation

@jedef
Copy link
Contributor

@jedef jedef commented Mar 27, 2023

@github-actions github-actions bot added the bug label Mar 27, 2023
@jedef jedef requested review from ltshb and pakb March 27, 2023 08:43
@jedef jedef force-pushed the bugfix-BGDIINF_SB-2748-add-selection-feedback-in-topics branch from a9bacb6 to 38eaf94 Compare March 27, 2023 16:29
@ltshb ltshb changed the title bugfix-BGDIINF_SB-2748: Add selection feedback in topics. BGDIINF_SB-2748: Add selection feedback in topics. Mar 28, 2023
Copy link
Contributor

@ltshb ltshb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed it doesn't work now

@jedef jedef force-pushed the bugfix-BGDIINF_SB-2748-add-selection-feedback-in-topics branch from 38eaf94 to 6be725f Compare March 28, 2023 09:45
@jedef jedef force-pushed the bugfix-BGDIINF_SB-2748-add-selection-feedback-in-topics branch from 6be725f to 00fe212 Compare March 28, 2023 12:40
@ltshb
Copy link
Contributor

ltshb commented Mar 28, 2023

buttons looks squashed, the padding on top/bottom could be increased or reduce the padding/margin on left/right to have kind of square button that don't look squashed.

@jedef
Copy link
Contributor Author

jedef commented Mar 28, 2023

@ltshb This is because the width is adaptive (i.e. margins between the buttons are of fixed size and the width of buttons and number of columns adapt to fill the available space. On the two screenshots you see the two extremes (largest button width just before a new row is created and smallest button width just after a new row is created).
image
image

If you prefer I could make the button width fixed and instead have the margin that is adaptive. But as you can see on screenshot for "Informations foncières", having a variable button width has the advantage that long titles can still fit on only one line if there is enough space. Fixing the button width would force these titles to always be on multiple lines, wich I don't really like. So I would prefer is leave to button width adaptive and maybe just increase a tiny bit the top and bottom paddings. What do you think?

@ltshb
Copy link
Contributor

ltshb commented Mar 29, 2023

I see your point about having the title on line. Looking at the old viewer it seems that the width is fixed but large enough to have all title on one line. In your current version depending on the screen width you might have very wide button which looks very ugly and a lots of white spaces.
image
I wonder if in the screenshot above it would not have been possible to have 2 column, and if not possible reducing the size of the window to have less whites spaces would be better. Here below is the old mapviewer with the same browser width as above:
image

@ltshb
Copy link
Contributor

ltshb commented Mar 29, 2023

Another idea would be to use the outline buttons to have less big fat red buttons.

@jedef
Copy link
Contributor Author

jedef commented Mar 30, 2023

I don't really like like the outline button as when you hover over it, it changes its color, and thats confusing, as its already selected. So for now I kept the primary-button.
What I changed (based on our discusstion) is:

  • On phone size there are already two columns. For that to work I had to increase the dialog size to 100% width in phone mode. This has also impacts on other dialogs (like "are you sure?" dialogs)
    image
    image

  • Button size is limited at 190px (This is the smallest size so that all german titles can be displayed on one line)

@jedef
Copy link
Contributor Author

jedef commented Mar 30, 2023

image

Some words don't break correctly. However this was already the case before. I think that this could be fixed by changing the translation (e.g. in the example above to "Grundstück­information"), so that the browser knows how to correctly split the word into two lines.) However, the translations are also used by the old viewer, so I'm not sure if I can do that safely.

@jedef jedef force-pushed the bugfix-BGDIINF_SB-2748-add-selection-feedback-in-topics branch from 35eaff8 to 0f3fdff Compare March 31, 2023 13:12
- Modal takes 100% width on mobile (also impacts other dialogs)
- Topic buttons can have a smaller width on mobile
- Topic buttons have a max height to improve appearance.
@jedef jedef force-pushed the bugfix-BGDIINF_SB-2748-add-selection-feedback-in-topics branch from 0f3fdff to 8c2d1d8 Compare March 31, 2023 13:48
@jedef jedef requested a review from ltshb March 31, 2023 13:55
Comment on lines +129 to +132
// For phone we set the width and height fixed to 100% of the view.
// dvh takes into account the user interface in mobile browsers (with vh part of the modal is
// not visible if ui is shown). Is recognized by browsers from 2022 or newer. If the browser
// is older, 90vh will normally be used, which is a bit less clean but good enough.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although this is a good idea for the topic use case where the window take anyway the whole screen, this doesn't fit well with all use cases. For the Delete and Share use case of the drawing the modal is smaller and it doesn't make sense to have it as a banner in the middle.
image
So I would either left it as before or only make it fullscreen when it make sense. When making it fullscreen the rounded corner needs to be removed though.

- Modal is centered with Flexbox instead of using top left 50% and
  transform translate. This fixes the automatic width sizing for when
  fluid property is activated, as before it would only ever take 50% of
  the screen (or min-width).
- When not fluid, the modal is of fixed size (compared to before were
  only a min-width was defined)
- When not fluid, we only define max widths and max heights.
- Border radius is removed on non-fluid modals in phone mode, because in
  this case the width is always 100vw.
@jedef jedef force-pushed the bugfix-BGDIINF_SB-2748-add-selection-feedback-in-topics branch from 74d3f49 to 07845cf Compare April 4, 2023 12:59
@jedef jedef requested a review from ltshb April 4, 2023 13:20
Copy link
Contributor

@ltshb ltshb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

@jedef jedef merged commit 6e3d557 into develop Apr 5, 2023
@jedef jedef deleted the bugfix-BGDIINF_SB-2748-add-selection-feedback-in-topics branch April 5, 2023 07:34
@pakb pakb mentioned this pull request May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants