Repository navigation
Syntax highlighting for ASDL #84697
Copy link
Copy link
Closed
Labels
3.9 (EOL)end of lifeend of lifedocsDocumentation in the Doc dirDocumentation in the Doc dirtype-featureA feature request or enhancementA feature request or enhancement
Description
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = None
closed_at = <Date 2020-05-07.20:58:17.968>
created_at = <Date 2020-05-05.13:51:02.634>
labels = ['type-feature', '3.9', 'docs']
title = 'Syntax highlighting for ASDL'
updated_at = <Date 2020-05-07.21:01:28.137>
user = 'https://github.com/isidentical'bugs.python.org fields:
activity = <Date 2020-05-07.21:01:28.137>
actor = 'BTaskaya'
assignee = 'docs@python'
closed = True
closed_date = <Date 2020-05-07.20:58:17.968>
closer = 'rhettinger'
components = ['Documentation']
creation = <Date 2020-05-05.13:51:02.634>
creator = 'BTaskaya'
dependencies = []
files = ['49129', '49133', '49134', '49135', '49136', '49138']
hgrepos = []
issue_num = 40517
keywords = ['patch']
message_count = 22.0
messages = ['368148', '368209', '368225', '368226', '368228', '368230', '368266', '368291', '368292', '368294', '368297', '368300', '368303', '368311', '368313', '368324', '368331', '368344', '368352', '368376', '368377', '368378']
nosy_count = 9.0
nosy_names = ['rhettinger', 'terry.reedy', 'ezio.melotti', 'eric.araujo', 'docs@python', 'zach.ware', 'willingc', 'mdk', 'BTaskaya']
pr_nums = ['19928', '19950', '19967']
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue40517'
versions = ['Python 3.9']Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
3.9 (EOL)end of lifeend of lifedocsDocumentation in the Doc dirDocumentation in the Doc dirtype-featureA feature request or enhancementA feature request or enhancement
Activity
isidentical commentedon May 5, 2020
ASDL is around here for a long time, and it was showed as raw text on documentation (under library/ast), IMHO it would be great to highlight it.
rhettinger commentedon May 5, 2020
+1
rhettinger commentedon May 6, 2020
New changeset d60040b by Batuhan Taskaya in branch 'master':
bpo-40517: Implement syntax highlighting support for ASDL (bpo-19928)
d60040b
rhettinger commentedon May 6, 2020
New changeset eff870b by Raymond Hettinger in branch 'master':
Revert "bpo-40517: Implement syntax highlighting support for ASDL (bpo-19928)" (bpo-19950)
eff870b
rhettinger commentedon May 6, 2020
I really like this idea but it needs different styling. Attaching a screen shot will significant readability and beauty issues.
Suggest:
isidentical commentedon May 6, 2020
Oh, sorry for that bad look :/ I just want it to look consistent, let me see what I can do further (I'll probably consult a friend of mine who understand this things). By the way, I could've just adjust the values over the existing code if you didn't revert, the core logic would be same we just need to change token types.
rhettinger commentedon May 6, 2020
Sorry about the commit/revert. I fat fingered a comment. Please do resubmit the PR. In general, this is a nice idea. The look just needs to be tweaked a bit.
isidentical commentedon May 6, 2020
Hey Raymond, can you give me your feedback on asdl.png (the screenshot of new theme)?
rhettinger commentedon May 6, 2020
The new screenshot looks nice. The colors are much better. Can you post another run with the class names in bold.
3 remaining items
isidentical commentedon May 6, 2020
Attaching 2 different styles python_bold.png (module <Python> is bold) and asdl_no_style.png (module <Python> has no style)
terryjreedy commentedon May 6, 2020
I tried both a laptop and desktop and slightly prefer unbolded. How about a darker blue?
isidentical commentedon May 6, 2020
Sorry but I have no control over styles. They are pre-defined, I only change the token type and pygments handles the rest of it. I dont know if such a color exists.
rhettinger commentedon May 7, 2020
Thanks for producing the comparison panel. In side-by-side views, python_bold.png looks best to me with asdl2.png as a close second.
isidentical commentedon May 7, 2020
I've found a bold dark blue, which I guess suits both your and @terry.reedy recommendations. How does bold_dark_blue.png looks?
zware commentedon May 7, 2020
I say merge it :)
isidentical commentedon May 7, 2020
I've updated the PR with bold_dark_blue.png changes.
rhettinger commentedon May 7, 2020
New changeset b7a78ca by Batuhan Taskaya in branch 'master':
bpo-40517: Implement syntax highlighting support for ASDL (GH-19967)
b7a78ca
rhettinger commentedon May 7, 2020
Thanks for the contribution. It looks much nicer than what we had before.
isidentical commentedon May 7, 2020
Thank you all for your reviews for styling, also I have to thank https://github.com/CyberSaxosTiGER for his external reviews on the color scheme.