Skip to content

BGDIINF_SB-2680 : remove ButtonWithIcon component#373

Merged
pakb merged 5 commits intodevelopfrom
feat-BGDIINF_SB-2680_remove_button_component
Mar 7, 2023
Merged

BGDIINF_SB-2680 : remove ButtonWithIcon component#373
pakb merged 5 commits intodevelopfrom
feat-BGDIINF_SB-2680_remove_button_component

Conversation

@pakb
Copy link
Contributor

@pakb pakb commented Feb 15, 2023

and replace all usage of this component with standard Bootstrap button. Also simplifying PopoverButton component, so that the specialized version used by feature editing is stored there, and the simpler version uses plain HTML/JS for the time selector.

Reworking the drawing toolbar so that it is more Bootrap based, and less custom CSS based. Also replacing many instances of custom CSS code in component, that could be tackled by Bootstrap, with Bootstrap classes.

Test link

@pakb pakb requested review from jedef and ltshb February 15, 2023 13:12
@pakb pakb force-pushed the feat-BGDIINF_SB-2680_remove_button_component branch from 385eb4b to a8af77e Compare February 17, 2023 07:39
@jedef
Copy link
Contributor

jedef commented Feb 17, 2023

I haven't looked at he code yet, but just some comments while testing the site:
On tablet size, the "close drawing toolbox" button is missing while there is a "close drawing mode" button that should only appear in phone mode.
Here is a screenshot:
image
Here is how it should look like:
image

Also previously the saving status had a reserved place in the drawing toolbox. Now the drawing toolbox becomes smaller or bigger as the saving status appears or disappears.

@pakb pakb force-pushed the feat-BGDIINF_SB-2680_remove_button_component branch from a8af77e to d5f0ea7 Compare February 20, 2023 07:27
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.

On mobile the drawing close button is not well placed:
image
When clicking on it we can see that the cross is not centered on the button.

Personally I don't really like big buttons, I would limit their size based on their content:
image
image

Before the drawing tool selection button and delete last point where not so wide, I like it better, but this might be just a preference taste 😉

I haven't looked at the code yet.

@pakb pakb force-pushed the feat-BGDIINF_SB-2680_remove_button_component branch from d5f0ea7 to 1c0d5fb Compare February 21, 2023 07:05
@pakb
Copy link
Contributor Author

pakb commented Feb 21, 2023

I've added back the reserved space for the "Saving..." / "Map saved." message, it doesn't wobble anymore when showing it the first time this way.
I also fixed some breakpoint in Bootstrap CSS class that I mixed up, the layout was switching to phone mode when we were on tablet size (what you just described @jedef )

Regarding button size @ltshb I wanted to go back to something more standard, Bootstrap wise, and wanted to impose a no custom CSS rule. I also wanted to cover as many space as possible on mobile, as I found the previous button lackluster in space and difficult to touch.
We have to imagine that this UI might fall into the hands of people who are just brand new to the web (and technology in general), we can't make a specialized app for geo/tech savvy only. We could discuss that in a tech talk if you want, but I'm a firm advocate of having big button on mobile

@pakb pakb requested a review from ltshb February 21, 2023 07:10
@ltshb
Copy link
Contributor

ltshb commented Feb 21, 2023

@pakb I see your point, all good for mobile. However now with this PR the buttons on Desktop are quite much bigger, for Desktop I would reduce the size of the drawing button (icon and text), this would also reduce the size of the menu and let more space for the map. With this PR the size of drawing button are slightly bigger on mobile, which is totally fine there, but are also bigger on desktop, and more there as on mobile.

@pakb pakb force-pushed the feat-BGDIINF_SB-2680_remove_button_component branch 2 times, most recently from e9e8571 to 21e700f Compare February 24, 2023 08:30
@jedef
Copy link
Contributor

jedef commented Feb 24, 2023

There is still a mismatch between phone and desktop mode. This is probably due to using directly the bootstrap viewport size classes instead of "@include respond-above(phone)" or using isPhoneMode.

image

pakb added 4 commits March 6, 2023 16:52
and replace all usage of this component with standard Bootstrap button.
Also simplifying PopoverButton component, so that the specialized version used by feature editing is stored there, and the simpler version is use as plain HTML/JS by the time selector.

Reworking the drawing toolbar so that it is more Bootrap based, and less custom CSS based.
Also replacing many instances of custom CSS code in component, that could be tackled by Bootstrap, with Bootstrap classes.
Center the "X" close button in its space
Only switch to phone layout on XS breakpoint (was switching on SM, and tablet layout was all messed up)
buttons were taking too much space with the display grid on desktop
I tried to make them as squared as possible on desktop with some padding and min-width
for drawing toolbox, as it was doing some weird breakpoint interpretation when holding the phone on landscape mode, switching to the desktop layout of the toolbox without completely doing so.

So I removed all the logic that was switching based on Bootstrap breakpoint and replaced it with v-if or v-class based approach based on the store values.
@pakb pakb force-pushed the feat-BGDIINF_SB-2680_remove_button_component branch from 21e700f to 4b4464e Compare March 7, 2023 07:33
@pakb
Copy link
Contributor Author

pakb commented Mar 7, 2023

I've reverted back some layout choice from the drawing toolbox to using isPhoneMode or isDesktopMode from the store, instead of relying on Bootstrap breakpoints

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.

Overall very good job 👍🏼

Just a minor issue with tippy.

Also not related to this PR but just an idea, the time button is quite big (was already before) it might be nicer to have a little bit smaller ?
image

Adding small margin on the Y axis for the "Map saved..." text as it was a bit too close to buttons
Removing unnecessary code and destroying tippy instance before unmount
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.

👍🏼

@pakb pakb merged commit a21977a into develop Mar 7, 2023
@pakb pakb deleted the feat-BGDIINF_SB-2680_remove_button_component branch March 7, 2023 15:02
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.

3 participants