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

News Site Nuxt #427

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

flashdesignory
Copy link
Contributor

This fixes next.js issue for Nuxt: #422

The fix here is to add unique ids to any article content that is a list.
This is done in the actual data files, so no need for the app to generate them at any point.

@kara

Copy link
Contributor

@julienw julienw left a comment

Choose a reason for hiding this comment

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

Thanks!

similarly to the other PR, I believe you can use article.id in Section.vue (instead of concatenating the section id and index).

import { content as contentEn } from "~/data/en/content";
import { content as contentJp } from "~/data/jp/content";
import { content as contentAr } from "~/data/ar/content";
import { content as contentEn } from "@/data/en/content";
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious, why have you changed this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

looks like nuxt supports both ways and this is consistent with next.js.
At least it still worked after I copied and pasted it by accident 🤣

I can revert that change though if there are concerns

Copy link
Contributor

Choose a reason for hiding this comment

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

I couldn't find any doc about that except from a babel plugin that I don't think we're using... Whatever works works also for me here

@rniwa
Copy link
Member

rniwa commented Sep 4, 2024

Do we have before/after numbers?

@julienw
Copy link
Contributor

julienw commented Sep 4, 2024

I checked just Firefox on my computer, couldn't see any difference.

@flashdesignory
Copy link
Contributor Author

Do we have before/after numbers?

Here's a snapshot:

browser before after
chrome 64.80 63.02
firefox 66.03 67.27
safari 60.47 65.13

@flashdesignory
Copy link
Contributor Author

@rniwa - any concerns to merge this?

@flashdesignory
Copy link
Contributor Author

@rniwa - I did some testing with @camillobruni and here are our crossbench results:

current workload:

browser safari Firefox Google Chrome
duration 61.80 ± 1.5% 66.96 ± 0.72% 66.0 ± 1.8%
score 16.27 ± 1.3% 14.98 ± 0.68% 15.19 ± 1.8%

pr workload:

browser safari Firefox Google Chrome
duration 61.68 ± 0.74% 66.04 ± 1.2% 65.40 ± 1.2%
score 16.31 ± 0.68% 15.18 ± 1.1% 15.33 ± 1.1%

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.

4 participants