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

Change type annotation arrow character #51

Merged
merged 2 commits into from May 1, 2019

Conversation

2 participants
@marcwilson
Copy link
Contributor

commented Apr 26, 2019

The new type annotations HTML output use an arrow character that isn't widely supported, or at least it doesn't render for me in Chrome 73 on macOS Mojave.
Can we change to a more commonly supported character, ie: →

Change from the arrow character used to render the return type annotation from
WIDE-HEADED RIGHTWARDS LIGHT BARB ARROW (http://www.fileformat.info/info/unicode/char/1f862/index.htm)
to the more widely supported
RIGHTWARDS ARROW (https://www.fileformat.info/info/unicode/char/2192/index.htm)

@kernc

This comment has been minimized.

Copy link
Contributor

commented Apr 26, 2019

I've had those concerns. 😅 Agreed, thanks!

But. The new arrow in the default monospace font looks too tiny. I'd prefer to see it slightly bigger.

Screenshot-2019-4-26 pdoc API documentation

Can you look into it?

@marcwilson

This comment has been minimized.

Copy link
Contributor Author

commented Apr 26, 2019

Yes, it does render on the smaller side (I guess that is why they created a bigger one!)
I've tried all the commonly supported right arrows from https://en.wikipedia.org/wiki/Arrow_(symbol) but they all render similarly small in that font for me.

Another option would be to just use the same "->" arrow that is used in the source?
Not as pretty but it would always be the same size as the text in any font

@kernc

This comment has been minimized.

Copy link
Contributor

commented Apr 26, 2019

Or maybe an arrow styled in CSS?

How does this look to you?

<span style="transform:scale(1.5, 3); display:inline-block; top:-3px; position:relative; margin:0 4px;">→</span>
@marcwilson

This comment has been minimized.

Copy link
Contributor Author

commented Apr 26, 2019

It looks a little bit weird to me:
image
and feels that all the CSS tweaking values would be specific to the actual font that is being used, so won't be consistent across users.

My preference would just be to go with -> if we want the arrow to be more pronounced as it will just work in all cases, albeit not as pretty:
image

@kernc

This comment has been minimized.

Copy link
Contributor

commented Apr 28, 2019

Then let's change to ->. It's what the user is used to, and it'll look nice once the mainstream monospace fonts support common programming ligatures.

marcwilson and others added some commits Apr 26, 2019

Change type annotation arrow character
Change from the arrow character used to render the return type annotation from
WIDE-HEADED RIGHTWARDS LIGHT BARB ARROW (http://www.fileformat.info/info/unicode/char/1f862/index.htm)
to the more widely supported
RIGHTWARDS ARROW (https://www.fileformat.info/info/unicode/char/2192/index.htm)
Use ASCII arrow (->)
Following the discussion in #51

@kernc kernc force-pushed the marcwilson:master branch from 9773e18 to 47a1fba May 1, 2019

@kernc kernc merged commit 92c6a8a into pdoc3:master May 1, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.