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

Move sync state and adding functions to App.js #31

Open
zoeyfrisart opened this issue Jan 17, 2018 · 0 comments
Open

Move sync state and adding functions to App.js #31

zoeyfrisart opened this issue Jan 17, 2018 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request
Milestone

Comments

@zoeyfrisart
Copy link

Measurements sync, Adding mesurements and media functions should be moved to App.js

How we do it now

  • Every component that needs measurements we resync the measurement.
  • The Add & AddMedia Components Sync the whole measurements.
  • The function that adds the data is inside the Add & AddMedia Component.

Why does this need improving.

  • This request the data way more often that needed.
  • We repeat the same code multiple times.
  • Longer loading times.

What would we need to change.

  • Move the ComponentWillMount sync state to the App.js and pass the measurements as a prop.
  • Move the AddMeasurement function to App.js and pass it down as a function
  • Move the AddMedia function to App.js and pass it down as a function.

What files are affected.

  • add/index.js
  • addMedia/index.js
  • measurement/index.js
  • App.js

Estimated time needed to change.

This should take a max 1-2 hours.

@zoeyfrisart zoeyfrisart added bug Something isn't working enhancement New feature or request maintainability labels Jan 17, 2018
zoeyfrisart pushed a commit that referenced this issue Jan 18, 2018
✨ InputGroup Component now accepts the props fullWidth & placeholder.
✨ AddMedia now accepts prop uid.
✨ AddMedia component.
✨ Home component to README.
✨ Updated README to reflect changes made.

🐛 Placeholder of input field date from "loading coordinates.." to "YYYY-MM-DD".
📝 Moved SyncState of measurements to components/home/index.js ( #31 ).
📝 Moved AddMeasurements function to components/home/index.js ( #31 ).
📝 Changed router to send all paths except account to /home and setup a router in /home to send to the right component.

📝 Cleaned up code of the Overview Component.
📝 Fixed issue #29 in src/style/index.scss
📝 Fixed issue's #26 #24 & #23 in src/components/header/style.scss

✨ Added Login component.
✨ Added Account component.
📝 The InputGroup Component now accepts autoComplete as a prop.

🐛 Added missing newlines in Login & Account.
📝 Added browser support to README

🐛 Fixed spelling mistake in README on line 7 (collaboration)
🐛 Fixed spelling mistake in src/components/inputGroup/index.js (autoComplete: PropTypes.string - line 44)
zoeyfrisart pushed a commit that referenced this issue Jan 18, 2018
✨  Added Media Component
✨  Added map & remove measurement button to Measurement Component
✨  Added MeasurementRow Component ( thx @Coen )

🎨  Made code of the Measurement Component DRY by moving measurementRow to component (#17 #18 #19 #20 #21 #22) ( Thx @Coen )
🎨  Changed color values from #7e7e7e and #fafafa to use var(--var-name)
🎨  Updated Media Component to use measurementRow (DRY)
🎨  Fixed code styling issues ( #25 #27 #28 #30 ) ( Thx @Coen )
🎨  Changed readme.md to README.md

🐛  Fixed items being in the wrong order ( #41 )
🐛  Quickfix for issues ( #46 #47 )
🐛  Moved syncState out of components in to src/components/home.js ( #31 ) ( This fix has been temporarily disabled due to #46 & #47 )
🐛  Changed font-weight: 900; to font-weight: 700; as the font does not support a font-weight of 900.
🐛  Changed Media Component from path="/media/:mediaId" to path="/med/:mediaId" so the Item Component actually sends you to the correct view when u click a media measurement.

📝  Added measurementRow to README
📝  Added removeMeasurement function as accepted prop for the Measurement Component
📝  Fixed spelling mistakes in ISSUE_TEMPLATE.md
📝  Updated README to add the right props to the Media Component
📝  Fixed spelling mistake in CHANGELOG.md on line 40

❗️ This build contains temporarily fixes. These issues should be resolved properly as soon as possible.

Thx @Coen for a fixing a lot of the issues in the Measurement Component.
Thx @ThijsvanRijn for reviewing the changes made.
@zoeyfrisart zoeyfrisart added this to the V2.1 milestone Jan 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants