Skip to content

Conversation

@fushar
Copy link
Contributor

@fushar fushar commented Nov 20, 2025

Proposed Changes

This PR fixes a buggy DataViews usage in Site -> Deployments. The titleField from defaultLayouts prop is not merged to the current view. If we want to use titleField in an initial view, we must specify it there (e.g. in the DEFAULT_VIEW) itself.

After this, the table renders the title field (Repository) with the correct styles.

Before

image

After

image

EDIT: This PR will remove the wrong titleField declaration instead.

Why are these changes being made?

The current titleField declaration is misleading.

Testing Instructions

  1. Go to /v2/sites/:siteSlug/deployments of a Business site.
  2. Connect one or more repositories.
  3. Verify the first column is rendered correctly as above.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you tested accessibility for your changes? Ensure the feature remains usable with various user agents (e.g., browsers), interfaces (e.g., keyboard navigation), and assistive technologies (e.g., screen readers) (PCYsg-S3g-p2).
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@github-actions
Copy link

github-actions bot commented Nov 20, 2025

@matticbot
Copy link
Contributor

matticbot commented Nov 20, 2025

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • help-center
  • notifications
  • odyssey-stats
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug fix-dataviews-deployments-primary on your sandbox.

@fushar fushar self-assigned this Nov 20, 2025
@fushar fushar requested a review from a team November 20, 2025 09:50
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Nov 20, 2025
@fushar fushar marked this pull request as ready for review November 20, 2025 09:50
@fushar fushar requested a review from a team as a code owner November 20, 2025 09:50
@@ -0,0 +1,5 @@
.dashboard-site-deployments-list {
.dataviews-view-table col.dataviews-view-table__col-commit {
width: auto;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Spent way too much time on it. 😅

Basically this is to revert the logic from https://github.com/WordPress/gutenberg/pull/72969/files#diff-90161488605f493d6d3373ccc278b42e484d27347f7e78794f182d181bf04050R319.

Otherwise, the Commit column will "lose" to the title field and will be shrunk as narrow as possible to make room for the title field like this. The branch name and badge will break:

Image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Found no-css solution instead: efd363f

<Text
as="code"
size="small"
truncate
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed truncation. Otherwise, the branch name will always be truncated to let the title field to get the most width. See the discussion here: #107236 (comment)

@matticbot
Copy link
Contributor

matticbot commented Nov 20, 2025

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

Copy link
Contributor

@gcsecsey gcsecsey left a comment

Choose a reason for hiding this comment

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

Thanks for working to fix this @fushar! With these changes, the Repository field is rendered with better styles now.

However, I also noticed that the spacing between the repository and commit columns are different. I spent some time searching, but I didn't find where this is coming from yet. Does the title field get some extra styling maybe? 🤔

trunk this branch
Image Image

@fushar
Copy link
Contributor Author

fushar commented Nov 20, 2025

Does the title field get some extra styling maybe?

Yes, this is Core behavior. The title column will get as much width as possible. See:

Copy link
Contributor

@gcsecsey gcsecsey left a comment

Choose a reason for hiding this comment

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

Does the title field get some extra styling maybe?

Yes, this is Core behavior. The title column will get as much width as possible. See:

Thanks for the context @fushar! As this is the Core behaviour and if it's also expected on the MSD, I think this is good to go. 👍

Copy link
Contributor

@arthur791004 arthur791004 left a comment

Choose a reason for hiding this comment

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

LGTM

<VStack spacing={ 1 }>
<Text title={ commit_message }>{ commit_message }</Text>
<HStack spacing={ 3 } alignment="left" style={ { width: 'auto' } }>
<HStack spacing={ 3 } alignment="left">
Copy link
Contributor

Choose a reason for hiding this comment

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

Not related to this PR, but it seems the alignment should be start instead of left?

@StevenDufresne
Copy link
Contributor

StevenDufresne commented Nov 20, 2025

I like the code improvements, but, the link not looking like a link feels like a visual regression. This came from feedback in DOTMSD-674, where users wanted to easily navigate to their repo.

Edit:
I understand that this is how other DataViews work. It feels more pronounced here because there is another underlined link in the adjacent column. I don't really know what the solution is here, but thought it was worth mentioning.

@fushar
Copy link
Contributor Author

fushar commented Nov 21, 2025

@StevenDufresne @gcsecsey thanks for the feedback. After some exploration and testing, I think I have to revert this and make the column as regular field instead 😅 some considerations:

  • It's actually the "Commit" column which should be the "title" of a DataViews row. Making the repository name as title field feels semantically wrong. But I don't want to make that change in this PR.
  • As discussed above the title field will try to take as wide column as possible. It makes a long commit message get wrapped where there's still much space in the title column, making it looks very weird.

So at least this PR removes the titleField which is actually not applied.

@fushar fushar merged commit dc0dea3 into trunk Nov 21, 2025
12 of 13 checks passed
@fushar fushar deleted the fix-dataviews-deployments-primary branch November 21, 2025 08:35
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Nov 21, 2025
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.

6 participants