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

Component first render through preact router causes node was deleted #47

Closed
zoeyfrisart opened this issue Jan 18, 2018 · 0 comments
Closed
Assignees
Labels
Breaking ❕ bug Something isn't working Confirmed help wanted Extra attention is needed Need more info
Milestone

Comments

@zoeyfrisart
Copy link

zoeyfrisart commented Jan 18, 2018

When changing from component, the first time a new route is entered it shows 'node was deleted'. It only works after going back and than reopening the component

How we do it now

  • Preact router

Why does this need improving.

What would we need to change.

  • Switching to React Router might solve this issue, this will need some more investigating to determine for certain.

Which files are affected.

  • src/routes/measurement/index.js
  • src/routes/media/index.js
  • src/routes/account/index.js

Error messages if available

screen shot 2018-01-18 at 18 30 06

Ways to reproduce this issue

  • Go to overview
  • Go to account
  • Graph will not load. (showing data is not loading properly).
  • Open react-devtools
  • Where the component should be it will say 'Node was removed'
  • Going back and then going back to the component will cause it to render properly

Temporary Quick Fix

For this issue we need a temporarily for the product to function properly in tommorows demo.
Suggested quickfix:

  • Load the measurements direct inside of the component.
  • This will force the data to refetch from firebase on every route change.
    This however will increase loading times and make our code less DRY.
    A long term solution should be made ASAP.

Estimated time needed to change.

Fixing this issue will proberly take arround 2 to 6 hours

@zoeyfrisart zoeyfrisart added bug Something isn't working help wanted Extra attention is needed Need more info labels Jan 18, 2018
zoeyfrisart pushed a commit that referenced this issue Jan 18, 2018
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
Breaking ❕ bug Something isn't working Confirmed help wanted Extra attention is needed Need more info
Projects
None yet
Development

No branches or pull requests

2 participants