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

FIX Nicely truncate link title/URL #153

Merged

Conversation

GuySartorelli
Copy link
Member

@GuySartorelli GuySartorelli commented Jan 8, 2024

Works regardless of screen size - check with split view and in edit view.

Also check with "DRAFT", "MODIFIED", and published (no) versioned labels.

Before:
linkfield on 4 branch without this PR

After:
linkfield with this PR

Issue

Copy link
Member Author

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

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

I ended up using https://css-tricks.com/flexbox-truncated-text/ as a guide for how to do this.

Comment on lines -112 to +114
&::before {

&[class*="font-icon-"]::before {
Copy link
Member Author

Choose a reason for hiding this comment

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

Required to override existing styles due to specificity

Copy link
Member

@emteknetnz emteknetnz left a comment

Choose a reason for hiding this comment

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

Versioned badge spacing is messed up in firefox and chrome

Before:
image

After:
image

@GuySartorelli
Copy link
Member Author

By "spacing" I assume you mean the vertical alignment of the text, and not any horizontal padding or anything else?

@GuySartorelli GuySartorelli force-pushed the pulls/4/truncate-link-text branch from 88f1b7f to d3ece30 Compare January 8, 2024 02:14
@GuySartorelli
Copy link
Member Author

Fixed vertical alignment of versioned badge

Copy link
Member

@emteknetnz emteknetnz left a comment

Choose a reason for hiding this comment

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

Tested locally, works good

@emteknetnz emteknetnz merged commit bdf0b36 into silverstripe:4 Jan 8, 2024
10 checks passed
@emteknetnz emteknetnz deleted the pulls/4/truncate-link-text branch January 8, 2024 22:35
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.

2 participants