New submission from Batuhan Taskaya batuhanosmantaskaya@gmail.com:
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.
---------- assignee: docs@python components: Documentation messages: 368148 nosy: BTaskaya, docs@python, eric.araujo, ezio.melotti, mdk, willingc priority: normal severity: normal status: open title: Syntax highlighting for ASDL type: enhancement
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue40517 _______________________________________
Change by Batuhan Taskaya batuhanosmantaskaya@gmail.com:
---------- keywords: +patch pull_requests: +19243 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19928
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue40517 _______________________________________
Raymond Hettinger raymond.hettinger@gmail.com added the comment:
+1
---------- nosy: +rhettinger
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue40517 _______________________________________
Raymond Hettinger raymond.hettinger@gmail.com added the comment:
New changeset d60040ba226bd2e3b6f58d074015aa2499dc1cb8 by Batuhan Taskaya in branch 'master': bpo-40517: Implement syntax highlighting support for ASDL (#19928) https://github.com/python/cpython/commit/d60040ba226bd2e3b6f58d074015aa2499d...
----------
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue40517 _______________________________________
Change by Raymond Hettinger raymond.hettinger@gmail.com:
---------- pull_requests: +19265 pull_request: https://github.com/python/cpython/pull/19950
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue40517 _______________________________________
Raymond Hettinger raymond.hettinger@gmail.com added the comment:
New changeset eff870b618ca6f6b7a60a271f15af7e54b8a1b97 by Raymond Hettinger in branch 'master': Revert "bpo-40517: Implement syntax highlighting support for ASDL (#19928)" (#19950) https://github.com/python/cpython/commit/eff870b618ca6f6b7a60a271f15af7e54b8...
----------
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue40517 _______________________________________
Raymond Hettinger raymond.hettinger@gmail.com added the comment:
I really like this idea but it needs different styling. Attaching a screen shot will significant readability and beauty issues.
Suggest: * Boldfacethe class names (Module, Interactive, etc) * Unboldface the fields names (body, types_ignores, argtypes, etc) * The tinted grape color does not work well on the green background. * Perhaps have a graphic designer take a look.
---------- Added file: https://bugs.python.org/file49129/Screen Shot 2020-05-05 at 10.17.15 PM.png
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue40517 _______________________________________
Batuhan Taskaya batuhanosmantaskaya@gmail.com added the comment:
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.
----------
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue40517 _______________________________________
Raymond Hettinger raymond.hettinger@gmail.com added the comment:
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.
----------
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue40517 _______________________________________
Batuhan Taskaya batuhanosmantaskaya@gmail.com added the comment:
Hey Raymond, can you give me your feedback on asdl.png (the screenshot of new theme)?
---------- Added file: https://bugs.python.org/file49133/asdl.png
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue40517 _______________________________________
Change by Batuhan Taskaya batuhanosmantaskaya@gmail.com:
---------- pull_requests: +19282 pull_request: https://github.com/python/cpython/pull/19967
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue40517 _______________________________________
Raymond Hettinger raymond.hettinger@gmail.com added the comment:
The new screenshot looks nice. The colors are much better. Can you post another run with the class names in bold.
----------
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue40517 _______________________________________
Batuhan Taskaya batuhanosmantaskaya@gmail.com added the comment:
Unfortunately there aren't many `bold` type tokens I can use, so I had to change color of module <Python>. If you wish I can make both class names and `Python` bold, or keep it in this way.
---------- Added file: https://bugs.python.org/file49134/asdl2.png
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue40517 _______________________________________
Batuhan Taskaya batuhanosmantaskaya@gmail.com added the comment:
(by the way, I did not push this change. I'll push it when you think it is ready)
----------
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue40517 _______________________________________
Terry J. Reedy tjreedy@udel.edu added the comment:
I don't like the red Python in asdl2. Just black, perhaps bold, would be better. Also I like the darker blue in asdl.py, bold or not. Better contrast to me from the greens. But I agree that grape is too clashy.
---------- nosy: +terry.reedy
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue40517 _______________________________________
Batuhan Taskaya batuhanosmantaskaya@gmail.com added the comment:
Attaching 2 different styles python_bold.png (module <Python> is bold) and asdl_no_style.png (module <Python> has no style)
---------- Added file: https://bugs.python.org/file49135/python_bold.png
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue40517 _______________________________________
Change by Batuhan Taskaya batuhanosmantaskaya@gmail.com:
Added file: https://bugs.python.org/file49136/asdl_no_style.png
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue40517 _______________________________________
Terry J. Reedy tjreedy@udel.edu added the comment:
I tried both a laptop and desktop and slightly prefer unbolded. How about a darker blue?
----------
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue40517 _______________________________________
Batuhan Taskaya batuhanosmantaskaya@gmail.com added the comment:
I tried both a laptop and desktop and slightly prefer unbolded. How about a darker blue?
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.
----------
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue40517 _______________________________________
Raymond Hettinger raymond.hettinger@gmail.com added the comment:
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.
----------
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue40517 _______________________________________
Batuhan Taskaya batuhanosmantaskaya@gmail.com added the comment:
I've found a bold dark blue, which I guess suits both your and @terry.reedy recommendations. How does bold_dark_blue.png looks?
---------- Added file: https://bugs.python.org/file49138/bold_dark_blue.png
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue40517 _______________________________________
Zachary Ware zachary.ware@gmail.com added the comment:
I say merge it :)
---------- nosy: +zach.ware
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue40517 _______________________________________
Batuhan Taskaya batuhanosmantaskaya@gmail.com added the comment:
I've updated the PR with bold_dark_blue.png changes.
----------
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue40517 _______________________________________
Raymond Hettinger raymond.hettinger@gmail.com added the comment:
New changeset b7a78ca74ab539943ab11b5c4c9cfab7f5b7ff5a by Batuhan Taskaya in branch 'master': bpo-40517: Implement syntax highlighting support for ASDL (GH-19967) https://github.com/python/cpython/commit/b7a78ca74ab539943ab11b5c4c9cfab7f5b...
----------
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue40517 _______________________________________
Raymond Hettinger raymond.hettinger@gmail.com added the comment:
Thanks for the contribution. It looks much nicer than what we had before.
---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue40517 _______________________________________
Batuhan Taskaya isidentical@gmail.com added the comment:
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.
----------
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue40517 _______________________________________