Skip to content

Conversation

@junsikshim
Copy link
Collaborator

Removed mxUtils' indexOf(), bind(), and forEach() as they are widely supported now.
I changed the all the examples in the storybook accordingly, but didn't touch the ones in docs.

Also removed unused imports in the files.

Thanks!

@junsikshim junsikshim requested a review from mcyph April 27, 2021 12:57
@junsikshim
Copy link
Collaborator Author

In addition, I refactored mxConstants so each variable/function is exported independently.
While doing that, prettier was applied to the files I changed.

Copy link
Collaborator

@mcyph mcyph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The (x) => {} syntax was originally removed by ESLint in favor of x => {} when I auto-formatted - it'd be great if there was a standard so it doesn't make many changes at once, but I don't have any preference for either way so will check my IDE to make sure it doesn't keep switching between yours and my style when committing.

I think the changes with the constants to remove mxConstants. is a good move, removing some more of the constants directly could be an idea too going forwards. I started doing this for the styles but hadn't finished e.g. in mxForm and a few other files. Removing DIALECT_SVG entirely could be a good idea too, as I think it's likely we won't use any other rendering modes going forwards.

I think we're making steady progress! Sorry for not reviewing for the last few days because of work, hoping to be able to get a few more example files from the stashed directory converted this weekend.

@mcyph mcyph merged commit e976ab3 into maxGraph:development Apr 30, 2021
@junsikshim
Copy link
Collaborator Author

@mcyph I just use 'format on save' feature in vscode with 'default formatter' set to prettier(esbenp.prettier-vscode).

I feel like we can discard all of DIALECT_* and RENDERING_HINT_*, but I'm not 100% sure though.

@tbouffard tbouffard added the refactor Code refactoring label Nov 20, 2022
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.

3 participants