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

feat(website): add review page #332

Merged
merged 1 commit into from
Oct 17, 2023
Merged

Conversation

TobiasKampmann
Copy link
Contributor

@TobiasKampmann TobiasKampmann commented Oct 5, 2023

  • use client:only, otherwise everything breaks. No idea why

When using map in react each element should have a unique key. Otherwise react will render everything (in that map) new when a single entry changed. Not fine, but works.
Hypothesis:
But when astro needs to hydrate this components, it cannot associate the correct props and the whole thing goes down.

@TobiasKampmann TobiasKampmann linked an issue Oct 5, 2023 that may be closed by this pull request
@netlify
Copy link

netlify bot commented Oct 5, 2023

Deploy Preview for pathoplexus ready!

Name Link
🔨 Latest commit d9950b5
🔍 Latest deploy log https://app.netlify.com/sites/pathoplexus/deploys/652e93a0e7be5000082153e0
😎 Deploy Preview https://deploy-preview-332--pathoplexus.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@TobiasKampmann TobiasKampmann force-pushed the 273-add-review-page branch 5 times, most recently from 28ab812 to 496d876 Compare October 9, 2023 14:55
@TobiasKampmann TobiasKampmann force-pushed the 273-add-review-page branch 2 times, most recently from 8ca4d50 to dd8b09a Compare October 10, 2023 09:52
@TobiasKampmann TobiasKampmann marked this pull request as ready for review October 10, 2023 17:10
@TobiasKampmann TobiasKampmann force-pushed the 273-add-review-page branch 2 times, most recently from 1db3867 to 0153a50 Compare October 11, 2023 14:31
@TobiasKampmann TobiasKampmann changed the title feat(website): add review page, WIP feat(website): add review page Oct 11, 2023
@chaoran-chen
Copy link
Member

use client:only, otherwise everything breaks. No idea why

Are you using MUI? MUI doesn't work properly with Astro's hydration (so I think that we should avoid it whenever there is a decent alternative.)

@TobiasKampmann TobiasKampmann marked this pull request as draft October 11, 2023 17:59
@TobiasKampmann
Copy link
Contributor Author

only mui icons...

@theosanderson
Copy link
Member

Sounds like that's it? withastro/astro#6512

@theosanderson
Copy link
Member

theosanderson commented Oct 11, 2023

(There's a possible workaround there if one is wedded to these icons - it also may apply to MUI more generally. I've also used react-icons a lot.)

website/README.md Show resolved Hide resolved
website/src/components/Review/ReviewPage.tsx Outdated Show resolved Hide resolved
website/src/components/Review/ReviewPage.tsx Outdated Show resolved Hide resolved
website/src/components/Review/ReviewPage.tsx Outdated Show resolved Hide resolved
website/src/components/Review/ReviewPage.tsx Outdated Show resolved Hide resolved
website/src/components/Review/ReviewPage.tsx Outdated Show resolved Hide resolved
website/src/components/Review/ReviewPage.tsx Show resolved Hide resolved
website/src/components/Review/ReviewPage.tsx Outdated Show resolved Hide resolved
@TobiasKampmann
Copy link
Contributor Author

download button will be implemented here #358

@TobiasKampmann
Copy link
Contributor Author

(There's a possible workaround there if one is wedded to these icons - it also may apply to MUI more generally. I've also used react-icons a lot.)

So, as much changed since the initial commit, now client:load works as expected (even with mui icons). Still a bit curious, what the issue was.

@TobiasKampmann
Copy link
Contributor Author

So, this load vs. only issue occured again and now I know the reason:

When using map in react each element should have a unique key. Otherwise react will render everthing (in that map) new when a single entry changed. Not fine, but works.

Now our hypothesis:
But when astro needs to hydrate this components, it cannot associate the correct props and the whole thing goes down.

@TobiasKampmann TobiasKampmann force-pushed the 273-add-review-page branch 2 times, most recently from 2af382e to 0d58413 Compare October 17, 2023 07:49
Copy link
Contributor

@fengelniederhammer fengelniederhammer left a comment

Choose a reason for hiding this comment

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

Some nitpicks, some smaller issues, overall it looks good.

website/src/components/Review/ReviewPage.tsx Outdated Show resolved Hide resolved
website/src/components/Review/ReviewPage.tsx Show resolved Hide resolved
website/src/components/Review/ReviewPage.tsx Outdated Show resolved Hide resolved
website/src/components/Review/ReviewPage.tsx Outdated Show resolved Hide resolved
website/src/components/Review/ReviewPage.tsx Outdated Show resolved Hide resolved
website/src/components/Review/DataRow.tsx Outdated Show resolved Hide resolved
website/src/components/Review/ReviewPage.spec.tsx Outdated Show resolved Hide resolved
website/src/types.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@fengelniederhammer fengelniederhammer left a comment

Choose a reason for hiding this comment

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

Let's do the remaining part in a follow up ticket.

website/src/components/Review/ReviewPage.tsx Show resolved Hide resolved
website/src/components/Review/ReviewPage.tsx Show resolved Hide resolved
* refactor: prototype for abstracted backend call with proper error handling
@fengelniederhammer fengelniederhammer merged commit ee28e15 into main Oct 17, 2023
10 checks passed
@fengelniederhammer fengelniederhammer deleted the 273-add-review-page branch October 17, 2023 14:07
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.

add review page
4 participants