Skip to content

Added paragraph scope handler - #1095

Merged
pokey merged 8 commits into
mainfrom
paragraph_scope_handler
Oct 31, 2022
Merged

Added paragraph scope handler#1095
pokey merged 8 commits into
mainfrom
paragraph_scope_handler

Conversation

@AndreasArvidsson

@AndreasArvidsson AndreasArvidsson commented Oct 26, 2022

Copy link
Copy Markdown
Member

Fixes #1055

Checklist

@AndreasArvidsson
AndreasArvidsson marked this pull request as ready for review October 26, 2022 05:35
@AndreasArvidsson

Copy link
Copy Markdown
Member Author

@pokey Updated with new generator format

@pokey pokey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Worth migrating all block tests to scopes/paragraph directory and then seeing what's missing. Upon a quick glance I didn't see any "next", "previous", or "n blocks" tests. Worth having some with edge cases too. I think probably want cross product of:

  • empty cursor at start of block
  • empty cursor in middle of block
  • empty cursor at end of block

Cross with

  • "block"
  • "next block"
  • "previous block"
  • "two blocks"
  • "two blocks backward"

It looks like we already have a few "every" tests, so probably ok on that front? Worth quick review tho

A bit annoying we still have to do all these cross products. If we tested the scope handler directly we could do many fewer tests 🤔

@AndreasArvidsson

Copy link
Copy Markdown
Member Author

Tests added
Yeah all of these cross products are really annoying. Would be nice if we could get abstraction to a point where we could do this as unit tests.

@pokey pokey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid

@pokey
pokey merged commit d46bb71 into main Oct 31, 2022
@pokey
pokey deleted the paragraph_scope_handler branch October 31, 2022 10:46
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.

Migrate paragraph to use a scope handler

2 participants