-
Notifications
You must be signed in to change notification settings - Fork 116
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 support for trailing and leading visual icons in Primer::Beta::Link #2982
Add support for trailing and leading visual icons in Primer::Beta::Link #2982
Conversation
🦋 Changeset detectedLatest commit: 681670a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
One of the failing tests is checking that there is no leading and trailing white space before the link text. Currently, every linebreak in the erb file is interpreted as white space. The erb syntax allows to strip the trailing white space with I currently see two options:
Let me know what you prefer. |
06a78ea
to
ac5347e
Compare
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 this 😄
Ah yeah I see what you mean... what if we added a |
04c9c94
to
8c523be
Compare
… the content with `strip` before rendering it
8c523be
to
b0e8b11
Compare
Hi @camertron I adressed your remarks and introduced a |
Ah yeah, that one always fails for forks because it pulls the original repo instead of the forked repo and can't find the branch. It's ok, I can manually override when I merge 👍 |
…gests. The flag was moved out and is checked before the method is called
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.
Awesome, thank you for your work on this and for persevering through my feedback! 🎉
…Primer::Beta::Link (primer#2982)" (primer#3040)" This reverts commit 612307d.
What are you trying to accomplish?
This PR adds slots for a
trailing_visual
and aleading_visual
. As of now, only Icons are supported as types.Screenshots
List the issues that this change affects.
Closes #2981
Risk Assessment
What approach did you choose and why?
I limited the visual to icons for now, as I did not know, which other types (avatar, svg, ...) shall be supported.
Anything you want to highlight for special attention from reviewers?
I extracted the code of the
call
method to a html.erb template because of the increased complexity of the template. In there I used acapture
block to avoid the previous duplication depending on the existance of a tooltip.Merge checklist