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

feat: sort the simple key value list #22335

Merged
merged 6 commits into from
May 19, 2024
Merged

Conversation

pauldambra
Copy link
Member

As part of the #mykologs hackathon

Sorting the simple key value list was surprisingly amazing

This also lets the caller promote particular properties

@pauldambra pauldambra requested a review from a team May 16, 2024 14:02
Copy link
Contributor

github-actions bot commented May 16, 2024

Size Change: +240 B (+0.02%)

Total Size: 1.05 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 1.05 MB +240 B (+0.02%)

compressed-size-action

Comment on lines +30 to +33
const promotedItems = promotedKeys?.length ? sortedItems.filter(([key]) => promotedKeys.includes(key)) : []
const nonPromotedItems = promotedKeys?.length
? sortedItems.filter(([key]) => !promotedKeys.includes(key))
: sortedItems
Copy link
Contributor

Choose a reason for hiding this comment

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

Some type of partition method would be cool but I don't think we have one

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@pauldambra pauldambra merged commit c41995f into master May 19, 2024
83 checks passed
@pauldambra pauldambra deleted the feat/sort-the-simple-key-list branch May 19, 2024 11:39
timgl pushed a commit that referenced this pull request May 21, 2024
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
thmsobrmlr pushed a commit that referenced this pull request May 21, 2024
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
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.

None yet

3 participants