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

refactor(type)!: do not return 'undefined' in getDefaultXXXStyle methods #209

Merged
merged 3 commits into from
Jul 2, 2023

Conversation

tbouffard
Copy link
Member

@tbouffard tbouffard commented Jul 2, 2023

The default edge and vertex styles are always defined. Updating the signature of the two methods returning default styles simplifies the code for callers, who don't have to deal with "undefined" values.

Improve the ts-example

  • rely on no undefined style
  • bump vite from 3.2.3 to 4.3.1 and increase the file size warning
  • improve the use of types
  • better explain why we cannot use enum to define the 'edgeStyle' CellStyle property

BREAKING CHANGE: Stylesheet.getDefaultVertexStyle and Stylesheet.getDefaultEdgeStyle no longer return undefined.

The default edge and vertex styles are always defined.
Updating the signature of the two methods returning default styles simplifies the code for callers, who don't have to
deal with "undefined" values.

Improve the ts-example
  - rely on no `undefined` style
  - bump vite from 3.2.3 to 4.3.1 and increase the file size warning
  - improve the use of types
  - better explain why we cannot use enum to define the 'edgeStyle' CellStyle property
@tbouffard tbouffard added the refactor Code refactoring label Jul 2, 2023
@tbouffard tbouffard marked this pull request as ready for review July 2, 2023 18:14
@tbouffard tbouffard merged commit 3d71f15 into development Jul 2, 2023
3 checks passed
@tbouffard tbouffard deleted the fix/default_stylesheet_method_signature branch July 2, 2023 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Code refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant