Skip to content

Vue 3 upgrade#14

Open
loleg wants to merge 22 commits into
dribdat:mainfrom
loleg:main
Open

Vue 3 upgrade#14
loleg wants to merge 22 commits into
dribdat:mainfrom
loleg:main

Conversation

@loleg
Copy link
Copy Markdown
Collaborator

@loleg loleg commented May 3, 2026

Various improvements, including the ability to navigate using browser history.

google-labs-jules Bot and others added 22 commits November 24, 2025 21:48
This change introduces `vue-router` to the application, enabling client-side routing.

- Configures routes for the main project list and individual project detail pages.
- Replaces the static component in `App.vue` with `<router-view>` to render routed components.
- Updates navigation in `Challenges.vue` to use `router.push` for in-app navigation.
- Implements a `watch` effect in `Challenges.vue` to handle direct navigation to project permalinks, automatically opening the project preview modal.
- Sets the default data source URL to an absolute path (`/datapackage.json`) to ensure correct data fetching on nested routes.
…rmalinks

Enable Vue Router for History and Permalinks
- Added sandbox="allow-scripts allow-same-origin" to iframes in Previews.vue.
- Added sandbox="allow-scripts allow-same-origin allow-forms" to the iframe in ModalFrame.vue to support Google Forms while maintaining security.

Co-authored-by: loleg <31819+loleg@users.noreply.github.com>
Modified `src/components/Previews.vue` to use `VITE_TIMER_LENGTH`
environment variable instead of a hardcoded value of 3 minutes.
The implementation uses robust parsing to ensure a fallback to 3
if the variable is not set or invalid. This follows Vite's
convention for environment variables as used elsewhere in the project.

Co-authored-by: loleg <31819+loleg@users.noreply.github.com>
Replaced the $O(N \times M)$ nested loop that filtered projects for each activity
with an $O(N + M)$ approach using a Map for project ID lookups.

Performance Improvement:
- Dataset: 1,000 projects, 10,000 activities
- Baseline: ~89.1ms
- Optimized: ~1.9ms
- Improvement: ~45x speedup

The change preserves existing functionality and handles cases where projects
may not be found for a given activity ID.

Co-authored-by: loleg <31819+loleg@users.noreply.github.com>
…oop-18382404731690640791

⚡ Optimize nested loop with Map in Challenges.vue
…s-8313855323161934604

🔒 Add sandbox attribute to iframes for security
…ngth-3916708532546328289

Make timer length configurable again
- Merge redundant sequential project iteration loops.
- Replace O(N*M) activity-to-project filter with O(N+M) Map lookup.
- Use string coercion for Map keys to maintain functional parity.
- Achieve ~98% speedup in benchmark with 5k projects and 20k activities.

Co-authored-by: loleg <31819+loleg@users.noreply.github.com>
- Implement URL validation to allow only http/https protocols for iframe sources in Previews.vue and ModalFrame.vue.
- Add sandbox attribute to all iframe elements for defense-in-depth.

Co-authored-by: loleg <31819+loleg@users.noreply.github.com>
…764402903990

🔒 Fix XSS via iframe src and enhance sandbox security
…ng-15405012685777778931

⚡ Optimize project and activity data processing in Challenges.vue
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.

1 participant