Skip to content

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

@pokey

Description

@pokey

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

Metadata

Metadata

Labels

bugSomething isn't workingcode qualityImprovements to code quality

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions