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

Adaptive Highlighting #634

Merged
merged 21 commits into from Jul 4, 2023
Merged

Adaptive Highlighting #634

merged 21 commits into from Jul 4, 2023

Conversation

felixroos
Copy link
Collaborator

fixes #632 , making the highlighting adapt to edits

felixroos and others added 21 commits July 1, 2023 23:52
- add onEnter callback for patternifyAST
- add leaf node location helpers
- add tests
- emit transpiler metadata from evaluate / afterEval
- currently logging miniLocations from Repl.jsx
- transpiler now uses m function with globalOffset
- patternifyAST now accepts global offset
- patternifyAST now calls .withLoc with global leaf location
- .withLoc replaces .withLocation + .withMiniLocation
- simple locs (offsets) are now used everywhere
- some tests fail, seems some haps have reordered...
- wip: Repl still uses hardcoded updateMiniLocations
- todo: find way to call updateMiniLocations dynamically
- dedupe flash / highlighting logic
- codemirror logic now lives only in codemirror package
- remove old highlighting logic
- use codemirror package in react package
- cleanup CodeMirror6.jsx
- pull setMiniLocations into useHighlighting
- migrate MiniRepl, nano-repl + Repl to new highlighting
docs: update repl chapter to reflect new transpiler behavior
@felixroos felixroos marked this pull request as ready for review July 4, 2023 20:19
@felixroos
Copy link
Collaborator Author

@mindofmatthew thanks for all the work! this now looks ready. any last wishes before merge?

This was referenced Jul 4, 2023
@mindofmatthew
Copy link
Contributor

No last wishes—this all looks good and the refactoring especially turned out very nice!

@felixroos felixroos merged commit 69894db into main Jul 4, 2023
2 checks passed
@felixroos felixroos deleted the highlight-ids branch July 4, 2023 21:38
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.

Adaptive Highlighting
2 participants