-
Notifications
You must be signed in to change notification settings - Fork 83
Enforce canonical field order in Social Web feed DataViews #2488
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Removes the actions dropdown (burger menu) containing like, boost, reply, and open original actions from the feed DataViews component. These actions were placeholders that opened the original post in a new tab, and their removal simplifies the UI while users can still click on posts to view them in the inspector panel. Changes: - Remove getFeedActions import and actions initialization - Remove actions prop from DataViews component - Rebuild JavaScript assets
Enforces canonical field order in the Social Web feed DataViews to ensure fields always display in the same order regardless of user toggling field visibility. When a user hides and re-shows a field, it now returns to its original position instead of being appended to the end. Problem: When users toggle field visibility in DataViews, the view.fields array gets modified. If a user hides a field and then shows it again, DataViews appends it to the end of the array instead of returning it to its original position. This causes the field order to become inconsistent. Solution: Implements field order normalization by defining a canonical order (metadata → title → excerpt → content → date) and sorting view.fields to match that order using a Map for position tracking. Changes: - Add field order normalization logic using useMemo - Create normalizedView that maintains canonical field order - Use normalizedView in DataViews component - Rebuild JavaScript assets
Copilot finished reviewing on behalf of
pfefferle
November 18, 2025 08:45
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Introduced a new module exporting a deep object equality function in build/social-web/feed-stage.js. Updated build outputs to include this utility, which can be used for comparing complex objects, arrays, Maps, Sets, and other types for structural equality.
obenland
approved these changes
Nov 18, 2025
Corrects the item count display in the bulk actions footer to show the number of selected items instead of the total number of items when items are selected.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[Focus] Editor
Changes to the ActivityPub experience in the block editor
Skip Changelog
Disables the "Changelog Updated" action for PRs where changelog entries are not necessary.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Enforces canonical field order in the Social Web feed DataViews to ensure fields always display in the same order regardless of user toggling field visibility. When a user hides and re-shows a field, it now returns to its original position instead of being appended to the end.
Problem
When users toggle field visibility in DataViews, the
view.fieldsarray gets modified. If a user hides a field and then shows it again, DataViews appends it to the end of the array instead of returning it toits original position. This causes the field order to become inconsistent and break the intended display order.
Solution
Implements field order normalization by:
fieldsarray: metadata → title → excerpt → content → datenormalizedViewthat sortsview.fieldsaccording to the canonical orderMapto track each field's position in the canonical orderProposed changes
useMemonormalizedViewthat maintains canonical field ordernormalizedViewin DataViews component instead of rawviewExample
Before:
After:
Other information:
Testing instructions:
Changelog entry
Changelog Entry Details
Significance
Type
Message