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

Remove unneeded parameters #728

Merged
merged 5 commits into from
Sep 27, 2020
Merged

Conversation

onlined
Copy link
Collaborator

@onlined onlined commented Sep 21, 2020

Description

Many methods receive arguments related to object state, which they
can access. This might create confusion and inconsistency about the
source of truth. So I removed unnecessary parameters.

Motivation and Context

  • Simplifying methods
  • Use component props and state as the source of truth in components

Checklist

[x] I have not included any built dist files (us maintainers do that prior to a new release)
[ ] I have added tests covering my changes
[x] All new and existing tests pass
[ ] My changes required the documentation to be updated
  [ ] I have updated the documentation accordingly
  [ ] I have updated the TypeScript 1.8 type definitions accordingly
  [ ] I have updated the TypeScript 2.0+ type definitions accordingly

Many methods receive arguments related to object state, which they
can access. This might create confusion and inconsistency about the
source of truth. So I removed unnecessary parameters.
Copy link
Owner

@arqex arqex left a comment

Choose a reason for hiding this comment

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

It's weird that the linter didn't catch the issues in travis, or before creating the commit.

src/datetime/TimeView.js Outdated Show resolved Hide resolved
src/datetime/YearsView.js Outdated Show resolved Hide resolved
@onlined onlined requested a review from arqex September 23, 2020 10:53
Copy link
Owner

@arqex arqex left a comment

Choose a reason for hiding this comment

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

Today I had the time to make a good review. There is a couple of small things, when resolved we can merge :)

src/datetime/DateTime.js Outdated Show resolved Hide resolved
src/datetime/DaysView.js Outdated Show resolved Hide resolved
Remove unneeded indirection
Move calculations to upper level for performance
@onlined onlined requested a review from arqex September 25, 2020 09:02
@arqex arqex merged commit e1e4a02 into arqex:master Sep 27, 2020
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.

None yet

2 participants