Closed manishshettym closed 8 months ago
Update: ✅ idiom sub-prog can be highlighted using the saved metadata on the HTML application.
TODO: there's a fix required to do this without breaking some newlines in the rendered code when used with syntax highlighters.
Update: fixes have been made, and the viz is in good shape now!
Updates: Improved the UX to work with codescholar application and also using the streamlit app
Current status: A lot of the presentation aspects can be covered using the original program graph (accessible via the index) from which this idiom was extracted.
✅ On graph side: idiom subgraph can be highlighted within the original graph ❌ On prog side: idiom sub-prog cannot be highlighted easily within the original prog, in a simple .py file.
Current solution: don't eagerly render idiomatic programs during search. Just store the metadata that can be easily transferred (even streamed) to a front-end and rendered using javascript more fancily (instead of within a .py file)
Metadata format: JSON Metadata schema:
https://github.com/tart-proj/codescholar/blob/28fd0a34ebc55d8370558db1f487a1866dce2f94/codescholar/search/search.py#L60-L69