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.
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.
I think the misalignment with the padding won't be great in general.. Maybe we could remove the
overflow: hidden;
in the main container above? 🤔 --cc @jameskosterIn general it makes me wonder what styles should belong in the DataViews package and which ones should be added by the consumers.. Maybe the link styles should be provided by the consumer if needed, because it could result to unexpected results..
For example in primary field someone could have a paragraph with nested links(
a
tag). Currently with ship withdisplay: block;
styles and would be weird IMO.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.
I agree this could lead to inconsistencies in a single data view which isn't ideal. It also breaks the 4px spacing system.
As for whether the styles are built-in, I see that as an implementation detail best left to y'all engineers to decide :) I can see that built-in styles could be unhelpful in some situations. As long as it's possible to apply truncation to page / template / pattern titles in certain layouts as required I'm happy.
Either way, the issue this PR aims to fix will continue to exist. @t-hamano perhaps an alternative approach could be to add 4px horizontal padding to
.dataviews-view-grid__primary-field
and reduce thegap
ondataviews-view-grid__title-actions
from 8 to 4px?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.
I've got a PR that touches on the same thing but doesn't need to add the padding #58814
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.
@oandregal I had overlooked that PR 😅 #58814 seems to have a broader discussion going on, so I'm happy to close this PR to prevent cluttering the discussion.