-
Notifications
You must be signed in to change notification settings - Fork 2k
MSD: fix github deployments DataViews title field #107236
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
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
|
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
| @@ -0,0 +1,5 @@ | |||
| .dashboard-site-deployments-list { | |||
| .dataviews-view-table col.dataviews-view-table__col-commit { | |||
| width: auto; | |||
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.
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:
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.
Found no-css solution instead: efd363f
| <Text | ||
| as="code" | ||
| size="small" | ||
| truncate |
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.
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)
|
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. |
gcsecsey
left a comment
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.
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 |
|---|---|
![]() |
![]() |
Yes, this is Core behavior. The title column will get as much width as possible. See:
|
gcsecsey
left a comment
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.
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:
- p1763382108107339-slack-C08UP22FWDP
- Dataviews: Fix dataview columns width WordPress/gutenberg#72969
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. 👍
arthur791004
left a comment
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.
LGTM
| <VStack spacing={ 1 }> | ||
| <Text title={ commit_message }>{ commit_message }</Text> | ||
| <HStack spacing={ 3 } alignment="left" style={ { width: 'auto' } }> | ||
| <HStack spacing={ 3 } alignment="left"> |
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.
Not related to this PR, but it seems the alignment should be start instead of left?
|
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: |
|
@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:
So at least this PR removes the |


Proposed Changes
This PR fixes a buggy DataViews usage in Site -> Deployments. The
titleFieldfromdefaultLayoutsprop is not merged to the currentview. If we want to usetitleFieldin an initial view, we must specify it there (e.g. in theDEFAULT_VIEW) itself.After this, the table renders the title field (Repository) with the correct styles.BeforeAfterEDIT: This PR will remove the wrong
titleFielddeclaration instead.Why are these changes being made?
The current
titleFielddeclaration is misleading.Testing Instructions
/v2/sites/:siteSlug/deploymentsof a Business site.Pre-merge Checklist