Skip to content

Conversation

@francinelucca
Copy link
Member

@francinelucca francinelucca commented Mar 26, 2025

Closes https://github.com/github/primer/issues/3922, https://github.com/github/primer/issues/4104

Implementing empty state for SelectPanel. Default message and the ability to customise them when there is no item to show either in the first load or when filtering (Under primer_react_select_panel_with_modern_action_list FF).

Resubmission of #5142 that had to be reverted

Changelog

New

  • SelectPanel now accepts a message prop to display error, warning and empty states through a new (internal) SelectPanelMessage component
  • FilteredActionList (modern) now accepts a message prop to render instead of the list for empty states
  • Stories demonstrating new empty, warning and error states functionality
  • Tests for new empty states functionality
  • Container css module class for FilteredActionList
No initial Item
Screenshot of the select panel that doesn't have any items to show. There is a message says You haven't created any projects yet. Start your first project to organise your issues.
No filtered Item demo

Video description:

Rewatch.Screen.Recording.-.2024-10-24.at.1.55.52.PM.mp4

Changed

  • Offloaded a lot of unnecessary announce logic for ModernActionList from SelectPanel to FilteredActionListWithDeprecatedActionList
  • SelectPanel now uses de-facto ModernActionList announcement logic through useAnnouncements
  • Adjusted SelectPanel stories to add empty states
  • Corrected some tests and added fakeTimers were needed due to new announcement logic
  • Renamed incorrect story "Height Variantions and Scroll" -> "Height Variations and Scroll"
  • VRT updates to account for corrected story name
  • Fixed loading bug where loading spinner was being displayed when no results where available on the panel (items had already been loaded but filter applied with no matching items)

Removed

  • Removed usage of LiveRegion component that seemed unnecessary as announcements are already being handled programmatically

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

  • This and This are a good stories to test the behaviour. Please note primer_react_select_panel_with_modern_action_list FF must be on

Merge checklist

broccolinisoup and others added 30 commits October 14, 2024 18:33
… github.com:primer/react into revert-5136-revert-4929-select_panel_loading_states
@github-actions github-actions bot added integration-tests: failing Changes in this PR cause breaking changes in gh/gh and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Mar 28, 2025
@primer-integration
Copy link

👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/369946

@github-actions github-actions bot requested a deployment to storybook-preview-5826 March 28, 2025 03:52 Abandoned
@francinelucca francinelucca marked this pull request as ready for review March 28, 2025 03:56
@francinelucca francinelucca requested review from a team as code owners March 28, 2025 03:56
@francinelucca francinelucca requested review from TylerJDev, joshblack, siddharthkp and tbenning and removed request for tbenning March 28, 2025 03:56
@github-actions github-actions bot added integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh and removed integration-tests: failing Changes in this PR cause breaking changes in gh/gh labels Mar 28, 2025
@primer-integration
Copy link

🔴 golden-jobs completed with status failure.

@github-actions github-actions bot added integration-tests: failing Changes in this PR cause breaking changes in gh/gh and removed integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh labels Mar 28, 2025
@francinelucca francinelucca added integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh and removed integration-tests: failing Changes in this PR cause breaking changes in gh/gh labels Mar 28, 2025
@francinelucca francinelucca added this pull request to the merge queue Mar 28, 2025
Merged via the queue into main with commit 5f40e43 Mar 28, 2025
48 checks passed
@francinelucca francinelucca deleted the feat/select-panel-empty-state branch March 28, 2025 15:48
@primer primer bot mentioned this pull request Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants