Skip to content

#666 ic-select refactor#4219

Open
lz405 wants to merge 8 commits intodevelopfrom
666-refactor-branch
Open

#666 ic-select refactor#4219
lz405 wants to merge 8 commits intodevelopfrom
666-refactor-branch

Conversation

@lz405
Copy link
Contributor

@lz405 lz405 commented Jan 28, 2026

Summary of the changes

Refactor ic-select

Related issues

Refactor ic-select code #666
Update ic-select and ic-menu to follow the combobox pattern #3757
Screen reader incorrectly announces default select can be typed in #4079
Add prop to toggle native select #3771
ic-select and ic-multi-select won't close #4233
Update current value when options change #4081

Checklist

General

  • Changes to docs package checked and committed.
  • All acceptance criteria reviewed and met.

Testing

  • Relevant unit tests and visual regression tests added.
  • Visual testing against Figma component specification completed.
  • Playground stories in React Storybook up to date, with any prop changes and additions addressed.
  • Compare performance of modified components against develop using Performance addon in React Storybook.

Accessibility

  • Accessibility Insights FastPass performed.
  • A11y unit test added and yields no issues.
  • A11y plug-in on Storybook yields no issues.
  • Manual screen reader testing performed using NVDA and VoiceOver.
  • Manual keyboard testing for keyboard controls and logical focus order.
  • Correct roles used and ARIA attributes used correctly where required.
  • Logical heading structure is maintained, and the HTML elements used for headings can be changed to fit within the wider page structure.

Resize/zoom behaviour

  • Page can be zoomed to 400% with no loss of content.
  • Screen magnifier used with no issues.
  • Text resized to 200% with no loss of content.
  • Text spacing increased as per the WCAG 1.4.12 success criterion with no loss of content.

System modes

  • Browser setting 'prefers reduced motion' tested. No animations or motion visible whilst this setting is on.
  • Windows High Contrast mode tested with no loss of content.
  • System light and dark mode tested with no loss of content.
  • Browser support tested (Chrome, Safari, Firefox and Edge).

Testing content extremes

  • Min/max content examples tested with no loss of content or overflow.
  • All prop combinations work without issue.
  • Tested for FOUC (Flash of Unstyled Content) in both SSR (Server-Side Rendering) and SSG (Static Site Generation) settings.
  • Controlled and uncontrolled input components tested.
  • Props/slots can be updated after initial render.

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@lz405 lz405 force-pushed the 666-refactor-branch branch 15 times, most recently from 3df416e to a63ddd0 Compare February 4, 2026 16:00
Copy link
Contributor

@GCHQ-Developer-299 GCHQ-Developer-299 left a comment

Choose a reason for hiding this comment

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

I think you need to regenerate the cypress images , currently the diff is showing that you've deleted them.

Regards commits, you can squash the cypress test and regenerated images into one commit, and I think you should add more detail to the 'add word' commit message.

@lz405 lz405 force-pushed the 666-refactor-branch branch from a63ddd0 to f1db419 Compare February 5, 2026 11:24
@GCHQ-Developer-299
Copy link
Contributor

Review in progress: all three versions seem to work well in keyboard, and function the same as Develop branch.

Interestingly it looks like one visual issue has been fixed even - the top-padding on grouped select. (develop vs. your branch)
Screenshot 2026-02-05 at 14 58 28
Screenshot 2026-02-05 at 14 58 33

Will now test with Voiceover screenreader :)

(note: I think you still need to regenerate those cypress images)

Copy link
Contributor

@GCHQ-Developer-299 GCHQ-Developer-299 left a comment

Choose a reason for hiding this comment

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

The 'loading with error' story no longer functions the same as it does on develop

Other than that, and the Cypress images, so far everything looks great! The three select variants all seem to work fine in voiceover :)

@lz405 lz405 force-pushed the 666-refactor-branch branch 3 times, most recently from 75e7c34 to e05d032 Compare February 6, 2026 14:01
| `"icon"` | Content will be placed to the left of the select text input. |


## CSS Custom Properties
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this section needs to be added back in (an npm run build should do it?)

Copy link
Contributor

@GCHQ-Developer-299 GCHQ-Developer-299 left a comment

Choose a reason for hiding this comment

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

Nice work fixing the Loading story behaviour :)
I have spotted some styling inconsistencies though

Copy link
Contributor

Choose a reason for hiding this comment

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

The Select should be showing focussed styles (blue) in this image

Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like the 'selected' styles aren't properly translated to high contrast here - before there was a full border

Copy link
Contributor

Choose a reason for hiding this comment

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

Another example of highlighted options styles not showing in High Contrast

Copy link
Contributor

Choose a reason for hiding this comment

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

This image has significantly changed - the two items aren't checked, and the highlighted item isn't anymore

@lz405 lz405 force-pushed the 666-refactor-branch branch 3 times, most recently from 81ecabf to 1efe017 Compare February 11, 2026 09:47
@lz405 lz405 force-pushed the 666-refactor-branch branch 4 times, most recently from dd8add4 to ecec77d Compare February 11, 2026 15:27
@lz405 lz405 force-pushed the 666-refactor-branch branch from ecec77d to 18b0562 Compare February 12, 2026 10:46
@lz405
Copy link
Contributor Author

lz405 commented Feb 12, 2026

Should have fixed #4233. Compare the 'sizes' storybook on either branch.

@lz405 lz405 force-pushed the 666-refactor-branch branch 2 times, most recently from 0b19c82 to 82d6fe4 Compare February 13, 2026 09:02
@GCHQ-Developer-299
Copy link
Contributor

@lz405 we merged a change to readme.md generation today that's caused a conflict for you - a fresh build oughta sort it

@lz405 lz405 force-pushed the 666-refactor-branch branch from 82d6fe4 to 9f16731 Compare February 17, 2026 09:54
…low combobox pattern

refactor ic-select to simplify code and follow the combobox pattern

re #666
update cypress tests for ic-select

test #666
update docs for ic-select

docs #666
…s that depend on ic-select

update readme and metadata for components that depend on ic-select

docs #666
update canary docs for ic-select dependencies

docs #666
…c-select validation

skip ic-pagination-bar tests that fail because they try to confidently set 'All' to the value of a
select which does not contain 'All' in its options

test #666
@lz405 lz405 force-pushed the 666-refactor-branch branch from 9f16731 to 6b5deab Compare February 17, 2026 10:15
Copy link
Contributor

@GCHQ-Developer-847 GCHQ-Developer-847 left a comment

Choose a reason for hiding this comment

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

I've looked through all the stories but still need to finish looking at the actual code. Left a few comments on the things I've found so far

But overall it's looking really good! Amazing work on such a complex ticket 🤩

Copy link
Contributor

Choose a reason for hiding this comment

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

With the searchable and multi-select - when you have a long list of options, e.g. in the 'Scroll behaviour' story, and you're focusing through them using the keyboard, the focused option doesn't scroll into view

Copy link
Contributor

Choose a reason for hiding this comment

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

In the 'Loading with error' stories, I've noticed that if you focus on the 'Retry' button and press Space / Enter, the select loses focus completely

Copy link
Contributor

Choose a reason for hiding this comment

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

In the 'Update input value from external request' searchable story, there's a slight difference when compared to the develop branch. On develop, when you select ‘unknown’ and look in the console, it emits both icChange and icOptionSelect with ‘unknown’. But on this branch, it does the same but with an extra icChange with value ‘item-1’

@GCHQ-Developer-847
Copy link
Contributor

Finished reviewing now - everything else looks good to me, will be happy to approve once those issues I commented about are addressed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants