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

resolves #3694 add support for style attribute to icon macro #3741

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

martingreilinger
Copy link

My proposed changes regarding different icon styles for the icon macro, for detailed information see my comment on the issue #3694 itself.

  • The contribution guidelines wish for documentation, so I tried adding basic documentation to the convert_inline_image method.
    I did not comment on my change directly, as I did not want to repeat the issue description and clutter the source code.
    But if wished, I can add a short summary.

  • Further I tried cleaning up the related test cases by grouping them based on a common test context.

Looking forward to hearing some feedback!

NOTE: If my changes get approved, I recommend renaming the issue from set to style to avoid future confusion.

@mojavelinux
Copy link
Member

Thank you for taking the time and effort to prepare this change.

Regarding the name, I want to stick with the existing terminology that we established in Asciidoctor PDF, which is set not style. I don't want to get into different styles for the same icon as that is a feature specific to Font Awesome. Instead, the set dictates the style (and yet is agnostic to icon set).

Please consult the documentation in Asciidoctor PDF for the behavior I'm looking for. https://github.com/asciidoctor/asciidoctor-pdf#font-based-icons

Thus, if you want the brands style for sass, you would use:

icon:sass[set=fab]

For now, we assume the necessary icons are loaded already, but this could change in the future. Right now, we aren't even supporting Font Awesome 5, so this would likely have to coincide with #2535.

@mojavelinux
Copy link
Member

I tried cleaning up the related test cases by grouping them based on a common test context.

Thanks. It's best to do that in a separate commit. And I realize this test suite needs a lot of work. It's quite old ;)

@martingreilinger
Copy link
Author

@mojavelinux thanks for the feedback, I wasn't aware this was such a big topic at first.
How would you suggest to move forward with this PR? It wouldn't be a problem for me to change the implementation as you intended it to be originally and move the test cleanup into a separated commit.
Do you want to close this PR and ill create a new one, or just push the changes here?

Or is this issue still in the draft stage since you mentioned Font Awesome 5 isn't supported yet? Then I'd be fine with closing the PR and maybe follow up on it once everything is settled.

@mojavelinux mojavelinux deleted the branch asciidoctor:main October 23, 2021 07:57
@mojavelinux mojavelinux reopened this Oct 23, 2021
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.

None yet

2 participants