Problem/Motivation

Currently the design of the chip component differs between the one used in Project Browser and the one outlined in the Drupal Design system.

Project Browser:
a chip in project browser alongside the devtools with the layout tab illustrating the padding used for chips in project browser
Drupal Design system:
two chip specs in the drupal design system illustrating the necessary paddings between elements and the extent of the touch target size

Proposed resolution

- I would vote for to adjust the design of the chips to the one defined in the Drupal Design system Figma document
- Currently based on the project_browser_chip.png the padding is 10px on the left and right but would have to be changed to 12px on the left and 8px on the right. The padding between the chip label and the closing icon should be 8px as well.
- The style of closing icon would have to be adjusted as well. The icon currently used for chips in project browser has an extra thin white outline which looks a bit off and which was my initial motivation to investigate the topic. The closing icon used in the Drupal Design system document looks cleaner in comparison.
- The only thing which would have to be checked is if the border radius used for the chip in project browser is in line with the one used in the Drupal Design system (I was unable to look up the used value there because I don't have a Figma account yet). Same goes for the font and chip sizes for the active filters in blue as well as the smaller font and chip sizes on the module cards.

Remaining tasks

  • ✅ File an issue about this project
  • ☐ Manual Testing
  • ☐ Code Review
  • ☐ Accessibility Review
  • ☐ Automated tests needed/written?
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rkoller created an issue. See original summary.

rkoller’s picture

pontus.andersson made their first commit to this issue’s fork.

pontus.talvikarhu’s picture

Status: Active » Needs review
fjgarlin’s picture

Status: Needs review » Needs work
StatusFileSize
new16.27 KB

Somehow I was expecting to find the close button with a different shade of blue and some additional padding (or the "x" slightly smaller), but that's not the case:
blue chip

vs

Drupal Design system:
two chip specs in the drupal design system illustrating the necessary paddings between elements and the extent of the touch target size

Shouldn't we address that too whilst we're working on this?

rkoller’s picture

thanks for working on the issue! and i agree with #6 even though i am still a bit confused which styling related issues could be already fixed and which better have to wait until #3285889: [meta] Svelte app themability is fixed.

1) the chips definitely need adjustments based on the issue summary. but i disagree with #6 in regards of "expecting to find a different shade of blue and some additional padding". the whole styling of the button needs to be updated. basically the current state in project browser needs to be inverted. if you take a look at the button in the drupal design system you have a darker grey close button body and the X is in the color of the background (like see though/cut out). in project browsers you have a thin white outline and a white X while the body is see through to the blue background.
in the drupal design system there isn't any case for a close button with a blue chip. but if you take a look at filter chips in the chips section https://www.figma.com/file/OqWgzAluHtsOd5uwm1lubFeH/💧-Drupal-Design-system?node-id=30586%3A7152 the checkmark icon is in white as the label. so i would think the close button should be white with the style adjusted like described before. (and not sure how the chip is set up if it is done in css or with an svg in claro)

2) if you mouse over the close button the extent of the click/touch target is the exact same like the extent of the close button. but according to the design system the touch target should be wider. perhaps a regression cuz #3293694: Increase click target on remove-filter on the "chip" should have dealt with that according to the issue summary and title?

3) currently the focus outline for the chips close button is a square while the outline in the design system is displayed as a circle.

4) the chip label text is in bold for the chips

pontus.talvikarhu’s picture

I absolutely missed that this had been commented on months ago. Sorry!

Is this still relevant in the current scheme of things? I can absolutely get back to it, but working at cross purposes with other efforts won't really help.

fjgarlin’s picture

I think the issue is still relevant. You might need to pull the recent changes and rebase as there has been a lot of activity in the past weeks/months.

tim.plunkett’s picture

Issue tags: +core-post-mvp
chrisfromredfin’s picture

gbois made their first commit to this issue’s fork.

gbois’s picture

I make this modification (see screen Capture d’écran 2023-10-20 à 14.49.58.png) but we need another image file svg to the cross and after i think that was good

jonblatho made their first commit to this issue’s fork.

jonblatho’s picture

Assigned: Unassigned » jonblatho
Issue tags: +Portland2024
jonblatho’s picture

Per @gbois's comment above, I replaced the chip close icon with that from the Drupal Design system and removed the old one, and I updated padding accordingly. Merging in months' worth of changes led to some craziness but it looks like stylelint is no longer complaining. The merge request title is no longer accurate; I'm new to contributing and can't figure out how to deal with that — very sorry! That aside, I think this should be ready.

chrisfromredfin changed the visibility of the branch 3293977-adjust-the-chip to hidden.

chrisfromredfin changed the visibility of the branch adjust-chip-design to hidden.

chrisfromredfin’s picture

Status: Needs review » Fixed

Much better; matches Drupal design system and I find it more readable and looks more Drupal-y. Reviewed & tested in DrupalPOd.

jonblatho’s picture

Thanks Chris! I wanted to add that I kept the chip background color gray because blue is intended for the "active" state of a chip per the Drupal Design system Figma document. However, there is no "inactive" counterpart in this case. Given that, it seems best to stick with the "default" state as pictured.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.