Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin UI: fixed regression in dashboard sort order #3010

Merged
merged 4 commits into from
May 21, 2020

Conversation

Vultraz
Copy link
Contributor

@Vultraz Vultraz commented May 21, 2020

I forgot that Array.sort operates in-place. Turns out that listKeys.sort() call I removed in #2998 had the side effect (unintuitive!) of sorting listKeys so when it was used to populate the dashboard, the cards appeared in the same order as the sidebar. This fixes it by moving the sorting to the admin meta provider so all uses of listKeys use the same ordering.

@changeset-bot
Copy link

changeset-bot bot commented May 21, 2020

💥 No Changeset

Latest commit: 943dceb

Merging this PR will not cause any packages to be released. If these changes should not cause updates to packages in this repo, this is fine 🙂

If these changes should be published to npm, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

@timleslie timleslie left a comment

Choose a reason for hiding this comment

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

Nice catch 👍

@timleslie timleslie merged commit e2fd8dd into keystonejs:master May 21, 2020
@Vultraz Vultraz deleted the admin-ui-fix-sort-regression branch May 21, 2020 23:14
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.

2 participants