Skip to content

Added paragraph scope handler #1095

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

Merged
merged 8 commits into from
Oct 31, 2022
Merged

Added paragraph scope handler #1095

merged 8 commits into from
Oct 31, 2022

Conversation

AndreasArvidsson
Copy link
Member

@AndreasArvidsson AndreasArvidsson commented Oct 26, 2022

Fixes #1055

Checklist

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

@pokey Updated with new generator format

Copy link
Member

@pokey pokey left a comment

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
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.

Copy link
Member

@pokey pokey left a comment

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