Skip to content

Re-evaluate decision to make non-empty selections non-weak #883

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

Closed
8 tasks done
pokey opened this issue Jul 19, 2022 · 0 comments · Fixed by #888
Closed
8 tasks done

Re-evaluate decision to make non-empty selections non-weak #883

pokey opened this issue Jul 19, 2022 · 0 comments · Fixed by #888
Assignees
Labels
bug Something isn't working code quality Improvements to code quality
Milestone

Comments

@pokey
Copy link
Member

pokey commented Jul 19, 2022

We're not sure whether the following is a good idea:

return selection.selection.isEmpty
? new WeakTarget(parameters)
: new TokenTarget(parameters);

Pros

Cons

The solution

  • Rename WeakTarget to UntypedRangeTarget and add a constructor argument hasExplicitRange
  • Rename isWeak to hasExplicitScopeType, but need to negate all references to it as it is the opposite
  • Check for other references to the term "weak" to make sure we're not missing something
  • Introduce hasExplicitRange as attribute on Target
  • For eg ScopeTypeTarget, hasExplicitScopeType = true and hasExplicitRange = true
  • For each target in spreadsheet, return the proposed type of target as indicated in the Proposed type row
  • For each action / modifier in spreadsheet, depending on the value of column Checks for implicit, check either !hasExplicitRange or !hasExplicitScopeType
  • Add tests for every cell in spreadsheet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working code quality Improvements to code quality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants