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

Chore/state refactor #111

Merged
merged 76 commits into from
Jul 5, 2022
Merged

Chore/state refactor #111

merged 76 commits into from
Jul 5, 2022

Conversation

josdejong
Copy link
Owner

@josdejong josdejong commented Jul 5, 2022

  • Refactor state from relying on a nested structure and Symbols into a solution that is lazy and uses a flat map with pointers. The new state is easier to understand and maintain.
  • Create and use helper functions like createValueSelection(...) to create selections, and use type guards like isValueSelection everywhere to simplify the code.
  • Refactor JSONPath from having numeric indexes to having them as string (better compatible with JSONPointer, and less error prone).
  • Refactor and simplify the dragging logic
  • Fixes issues related to selection being updated after patch instead of in one go
  • Refactor more code to TypeScript
  • Add unit tests
  • Performance is comparable to what it was

josdejong added 30 commits June 10, 2022 11:57
josdejong added 26 commits June 28, 2022 11:40
@josdejong josdejong merged commit d2ab2af into main Jul 5, 2022
josdejong added a commit that referenced this pull request Jul 5, 2022
BREAKING CHANGES:

- The type `JSONPath` is changed from `Array<string | number>` to `Array<string>`
- Some TypeScript types now come from `immutable-json-patch`

All changes:

- Refactor state from relying on a nested structure and Symbols into a solution that is lazy and uses a flat map with pointers. The new state is easier to understand and maintain.
- Create and use helper functions like `createValueSelection` to create selections, and use type guards like `isValueSelection` everywhere to simplify the code.
- Refactor `JSONPath` from having numeric indexes to having them as string (better compatible with `JSONPointer`, and less error-prone).
- Use more TypeScript types from `immutable-json-patch`
- Refactor and simplify the dragging logic
- Fixes issues related to selection being updated after patch instead of in one go
- Refactor more code to TypeScript
- Add unit tests
- Performance is comparable to what it was
@josdejong josdejong deleted the chore/state_refactor branch July 5, 2022 14:35
josdejong added a commit that referenced this pull request Jul 6, 2022
BREAKING CHANGES:

- The type `JSONPath` is changed from `Array<string | number>` to `Array<string>`
- Some TypeScript types now come from `immutable-json-patch`

All changes:

- Refactor state from relying on a nested structure and Symbols into a solution that is lazy
  and uses a flat map with pointers. The new state is easier to understand and maintain.
- Create and use helper functions like `createValueSelection` to create selections, and use
  type guards like `isValueSelection` everywhere to simplify the code.
- Refactor `JSONPath` from having numeric indexes to having them as string
  (better compatible with `JSONPointer`, and less error-prone).
- Use more TypeScript types from `immutable-json-patch`
- Refactor and simplify the dragging logic
- Fix issues related to selection being updated after patch instead of in one go
- Refactor more code to TypeScript
- Add unit tests
- Performance is comparable to what it was
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.

1 participant