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

Extract ViewNavigation component #727

Merged
merged 1 commit into from
Sep 21, 2020

Conversation

onlined
Copy link
Collaborator

@onlined onlined commented Sep 21, 2020

Description

Three files use same navigation structure, so I extracted it to a
component for DRY.

Motivation and Context

  • DRY
  • Abstracting out implementation details

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

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.

This PR is great and it's definitely going in the right direction! If we are going to create smaller files, we probably would like to also update the folder structure.

I was thinking about something like:

src/
|-- DateTime.js
|-- parts/
|   |-- DateInput.js
|   |-- ViewNavigation.js
|-- playground/
|   |-- App.js
|   |-- index.js
|-- views/
|   |-- DaysView.js
|   |-- MonthsView.js
|   |-- YearsView.js

With the playground we have the problem to make it work after moving their files out from the root of /src.
What do you think?

src/datetime/MonthsView.js Show resolved Hide resolved
@onlined
Copy link
Collaborator Author

onlined commented Sep 21, 2020

@arqex Directory structure seems good, but I think it should be organized in another PR.

@onlined onlined changed the title Extract Header component Extract ViewNavigation component Sep 21, 2020
Three files use same navigation structure, so I extracted it to a
component for DRY.
@arqex arqex merged commit 5ff74a5 into arqex:master Sep 21, 2020
@onlined onlined deleted the extract-header-component branch September 21, 2020 16:26
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