-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add display text for external medium links #480
Conversation
Codecov Report
@@ Coverage Diff @@
## mampf-next #480 +/- ##
==============================================
- Coverage 66.65% 66.64% -0.02%
==============================================
Files 311 311
Lines 9360 9363 +3
==============================================
+ Hits 6239 6240 +1
- Misses 3121 3123 +2
|
@@ -5,9 +5,10 @@ | |||
</h5> | |||
</div> | |||
<div class="card-body text-center"> | |||
<%= link_to t('click_here'), | |||
<%= link_to external_link_description_not_empty(medium), | |||
medium.external_reference_link, |
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.
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 thought the display text was just intended for some short text, e.g. "LA Bosch". That's why the input field (to enter the display text) is also just a small field and not a whole expandable box. The word-break: break-all;
is therefore just for the edge case, so that the button does not stick out of the outer div. (Note that edge case also means when the display text is empty, then we show the url itself).
While I don't think that this button is overly pretty for long texts, I also don't really like the option of a "Link" button next to the display text as I feel like links should show the thing they point to directly on them and not somewhere else.
Closes #479
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
new feature, see Different representation of external medium links #479 for more details
Please check if the PR fulfills these requirements
What is the current behavior? (You can also link to an open issue here)
What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
Other information:
Preview