concrete-utopia / utopia

Design ❤️ Code
https://utopia.app
MIT License
3.75k stars 168 forks source link

Add tabs to component picker #5428

Open Rheeseyb opened 6 months ago

Rheeseyb commented 6 months ago

The component picker (triggered by clicking the plus button in the Navigator) shows all components, and we want those components to be categorised, and for the picker to use tabs for jumping to those categories.

Image

We don't yet have a way of categorising components (for the sake of this task we can assume those categories will be provided by the components API). This task is purely about implementing the UI to support this.

What we want:

Bonus task:

Notes:

maltenuhn commented 6 months ago

@lankaukk could you take a look at this, and see if there's a version with (some) icons across the top, for common categories?

benwolfram commented 6 months ago

Design feedback:

• add -> before selected list item

<Icn
          category='semantic'
          type='classicarrow-right'
          width={16}
          height={16}
          style={{ opacity: isFocused ? 1 : 0 }}
          color='dynamic'
        />

• selected list item gets color: colorTheme.dynamic.value and no background • smaller gap between arrow, cube icon and label (try ~4px) • selected tab gets background: colorTheme.primary.value and color: colorTheme.white.value

make popup theme-aware - entire popup gets: • backgroundColor: colorTheme.bg0.value, • color: colorTheme.fg1.value, • padding: 4, • boxShadow: UtopiaStyles.shadowStyles.low.boxShadow, • border: .2px solid ${colorTheme.popupBorder.value}, • borderRadius: 10,