treetracker-web-map-client icon indicating copy to clipboard operation
treetracker-web-map-client copied to clipboard

refactor: custom icon sizing

Open RubenSmn opened this issue 3 years ago • 5 comments
trafficstars

Description

Will improve the resizing on mobile, first it was a fixed 28px now it is 75% of the initial(desktop) value. All can be overridden with the sx prop, a good example is in the ImpactSection.

Reason for the change is that there is no need to set a different height and width since the svg will be rendered as a square anyway.

  • add size prop to CustomIcon component
  • update all components to use new size prop
  • updated some icon sizes to improve ux

Type of change

  • [x] Enhancement

Checklist:

  • [x] I have performed a self-review of my own code
  • [x] My changes generate no new warnings

RubenSmn avatar Oct 30 '22 11:10 RubenSmn

@dadiorchen we should consider this. It will greatly improve the UI of our icons, especially on mobile.

RubenSmn avatar Dec 05 '22 10:12 RubenSmn

@RubenSmn okay, I will download this and run it to check locally, can you fix the conflict for me?

dadiorchen avatar Dec 06 '22 01:12 dadiorchen

@dadiorchen done!

RubenSmn avatar Dec 06 '22 07:12 RubenSmn

@RubenSmn do you think this is still valid or we can close it?

dadiorchen avatar Jun 30 '23 03:06 dadiorchen

@dadiorchen I think it still could be valuable since it standardizes the size of a icon. For example on the top page: https://beta-map.treetracker.org/top the tree icons on the leader board have a incorrect size.

RubenSmn avatar Jun 30 '23 09:06 RubenSmn