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

nested definitions (lots of information in description) #23

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Korede-TA
Copy link
Owner

nested definitions work via a 2-step process. first we select a range of cells we've drawn out representing the nested grammar we want to define, and stage the definition with a particular name. the second portion involves looking for the newly staged grammar definition in the suggestions list, and completing it in order to bind that suggestion to a slot (input grammar) in a parent.

here's a few edge cases to keep in mind:

  • if the selection only covers a subset of a nested table, then you can't define a grammar out of it.
  • staged nested definitions can only be bound to one slot in the parent grammar at a time.

this PR also doesn't cover cases like:

  • how do we bind a grammar in a way a repeated set of values can be represented.
  • ...

some bugs this involves:

  1. When we complete suggestions, it renders weirdly Yew's VDOM still has many diffing errors that we hope our solved in the release of Yew 0.15 by "keyed" attributes (see the comment i left on the project's issue tracker)
  2. creating nested cells, or adding rows and columns results in the whole column being deleted.
  3. typing in a cell logs the keystrokes twice. this might also be a result of the VDOM diffing inefficiencies.
    (see gif below for bugs 2 and 3)
    Screen-Recording-2020-04-29-at-3

also includes some WIP changes for getting saving/loading working

there's still an issue with the top-level defined grammar not being
included in the suggestions. i suspect it's because the name is
overwritten at some point.
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.

None yet

1 participant