Vue 3 upgrade#14
Open
loleg wants to merge 22 commits into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Various improvements, including the ability to navigate using browser history.