Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Turned off indexing for the /paddle-checkout page. * Removed .env python env file from .gitignore. That way the ./run script will work to invoke the scripts inside mac-mouse-fix-scripts/ on a fresh clone * Improved locale-switches: * Added app.vue file (instead of letting nuxt autogenerated it). Calling finalizePendingLocaleChange() in there which creates smoother locale changes together with other changes * Refactored router.options.ts to clean up and make the scroll position to be nicely preserved after switching locales with new mechanism. Also possibly made it more robust in the future by having it fall back to some default (browser?) scroll-pos-restoration as a fallback case (Before, the fallback case was scrolling to the top of the page). Also added logging to the scroll-pos-restoration, which would've spared me a lot of time figuring out where the scroll pos-changes come from while working on this commit. * Improved LocalePicker.vue. Now updates the selection when user navigates through browser history. Cleaned up code. Made it switch locales using a different techique. Together with the new `skipSettingLocaleOnNavigate: true` setting in nuxt.config, and the `finalizePendingLocaleChange()` call inside `app.vue`, this has the effect that the app will first navigate to a new route (e.g. from /de/404 to /vi/404, and then switch locales afterwards. Afaik this is the best experience. We're not fully reloading the page, which makes things faster. But we're also not first switching the locale, and then switching routes (which feels like a half-reload of the page - replays the intro animations, etc.)) * Update the mechanism for loading uiStrings inside QuoteCard.vue to work with the new localeSwitch mechanisms. * Disabled the language-redirect-fix.js (which reloaded the page after a locale switch) since the underlying bug seems to have been fixed. * Fixed/updated mechanism for disabling horizontal scrolling and disabling vertical scrolling while the page (mostly the intro section) is loading. This is implemented in tailwind.css and index.vue. Timing also had to be adjusted to new router.options.ts logic iirc. * Also fixed/updated related mechanism for hiding the `afterIntro` on Index.vue while the intro is loading. The BottomNav is now also hidden. * Added new function "objectDescription()" for logging objects with circular refs (JSON.stringify crashes.) * Made it so the user can scroll, and the intro animation starts loading before the intro 'transition' animation has played (the intro transition consists of the localizationProgress and the down-arrow-chevron fading in.) Also restructured the html/css of those to avoid interference between the scroll-linked intro animation and the intro-transition (The used to both want to control the same opacity values leading to animation breakage when scrolling during the intro transition.) * Moved localization.ts and markdownTranslate.ts composables into the setup-cool-i18n.ts plugin. We did this to fix issues where we couldn't use $mt() in a non-<script setup> context or something. Not sure this was necessary. * Cleaned up implementation for localizationProgressDisplay inside Intro.vue (Not sure if I improved the appearance / behaviour as well, but it works/looks nice now.) * Removed storeToRefs() calls with using the `global.someGlobalVar` store directly, for clearer code. * Added useLocalePath() import in BackButton.vue. Don't know why the code worked before this, since it seems we already were using `localePath()`, but it has red squiggles in vscode if you don't import it. * Fixed some errors by replacing ! with ? in the vue templates and code (iirc). I remember specifically there were errors on the console, when resizing the window. Not sure if I introduced the errors while working on this commit or if they were present before. * Comments and documentation added * Moved de.js and en-US.js to and `old` folder since they are unused. * Cleaned up lots of code. E.g.: * Index.vue template * Further updated dependencies: (I think we did this to solve some bugs caused by the dependencies? I can't recall though) "devDependencies": { - "@nuxt/devtools": "latest", + "@nuxt/devtools": "^1.3.9", "@nuxtjs/i18n": "^8.3.3", "@nuxtjs/robots": "^4.0.2", "@nuxtjs/sitemap": "^5.0.0", "@nuxtjs/tailwindcss": "^6.12.1", - "@types/node": "^18.19.44", + "@types/node": "^22.3.0", "nuxt": "^3.12.4" }, "dependencies": { "@nuxt/image": "^1.7.0", - "@pinia/nuxt": "^0.4.11", - "@types/markdown-it": "^13.0.9", + "@pinia/nuxt": "^0.5.3", + "@types/markdown-it": "^14.1.2", "assert": "^2.1.0", "gsap": "^3.12.5", - "markdown-it": "^13.0.2" + "markdown-it": "^14.1.0" } } TODO: - [ ] Test on mobile - [ ] Bring enhancements from localizationProgress of website to the .md files. (Make the localizationProgress message itself localizable.) - [ ] ? Fix jank when expanding quote cards and then scrolling up into the zoom animation - [ ] ? Fix jank when expanding / unexpanding feature cards repeatedly.
- Loading branch information