-
Notifications
You must be signed in to change notification settings - Fork 100
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(gsoc'24): Advance options for embed view #312
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for circuitverse ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@niladrix719 please fix the conflicting file |
src/pages/embed.vue
Outdated
case 'default': | ||
updateThemeForStyle(THEME.default); | ||
break; | ||
case 'night-sky': | ||
updateThemeForStyle(THEME.night_sky); | ||
break; | ||
case 'lite-born-spring': | ||
updateThemeForStyle(THEME.lite_born_spring); | ||
break; | ||
case 'g-and-w': | ||
updateThemeForStyle(THEME.g_and_w); | ||
break; | ||
case 'high-contrast': | ||
updateThemeForStyle(THEME.high_contrast); | ||
break; | ||
case 'color-blind': | ||
updateThemeForStyle(THEME.color_blind); | ||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
case 'default': | |
updateThemeForStyle(THEME.default); | |
break; | |
case 'night-sky': | |
updateThemeForStyle(THEME.night_sky); | |
break; | |
case 'lite-born-spring': | |
updateThemeForStyle(THEME.lite_born_spring); | |
break; | |
case 'g-and-w': | |
updateThemeForStyle(THEME.g_and_w); | |
break; | |
case 'high-contrast': | |
updateThemeForStyle(THEME.high_contrast); | |
break; | |
case 'color-blind': | |
updateThemeForStyle(THEME.color_blind); | |
break; | |
case 'default': | |
updateThemeForStyle(THEME.default); | |
break; | |
case 'night-sky': | |
updateThemeForStyle(THEME.night_sky); | |
break; | |
case 'lite-born-spring': | |
updateThemeForStyle(THEME.lite_born_spring); | |
break; | |
case 'g-and-w': | |
updateThemeForStyle(THEME.g_and_w); | |
break; | |
case 'high-contrast': | |
updateThemeForStyle(THEME.high_contrast); | |
break; | |
case 'color-blind': | |
updateThemeForStyle(THEME.color_blind); | |
break; |
updateThemeForStyle(theme.value)
refactor this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as theme.value
is coming from params, we cannot directly put theme.value
inside the updateThemeForStyle
func, would like to discuss if there is any better way
…9/cv-frontend-vue into embed-advance-options
…9/cv-frontend-vue into embed-advance-options
WalkthroughThe changes introduce a new TypeScript file defining a theme type and constant, enhancing theming capabilities. The Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- src/assets/constants/theme.ts (1 hunks)
- src/pages/embed.vue (8 hunks)
- src/styles/css/embed.css (2 hunks)
Additional comments not posted (18)
src/assets/constants/theme.ts (1)
1-17
: LGTM! Consider the suggestion from the previous review.The code changes are approved. The type and constant are correctly defined.
However, the suggestion from the previous review is still applicable:
export const THEME = { default: 'Default Theme' as const, night_sky: 'Night Sky' as const, lite_born_spring: 'Lite-born Spring' as const, g_and_w: 'G&W' as const, high_contrast: 'High Contrast' as const, color_blind: 'Color Blind' as const, }
Using
as const
will infer string literal types for the theme names, providing better type safety.src/styles/css/embed.css (2)
49-50
: LGTM!The code changes are approved. Setting
height: auto;
improves responsiveness by allowing the element to adjust its height based on the content. Addinggap: 1rem;
enhances the layout by introducing spacing between flex items.
264-274
: LGTM!The code changes are approved. The new CSS rule for
#bottom_right_circuit_heading
improves the visual hierarchy by establishing a fixed position for the element at the bottom right of the viewport. The font settings and color enhance the appearance of the heading.src/pages/embed.vue (15)
Line range hint
51-75
: LGTM!The code changes are approved.
88-88
: LGTM!The code changes are approved.
Line range hint
95-106
: LGTM!The code changes are approved.
Line range hint
107-118
: LGTM!The code changes are approved.
138-141
: LGTM!The code changes are approved.
167-167
: LGTM!The code changes are approved.
182-182
: LGTM!The code changes are approved.
183-183
: LGTM!The code changes are approved.
197-197
: LGTM!The code changes are approved.
198-198
: LGTM!The code changes are approved.
199-199
: LGTM!The code changes are approved.
200-200
: LGTM!The code changes are approved.
201-201
: LGTM!The code changes are approved.
203-203
: LGTM!The code changes are approved.
243-246
: LGTM!The code changes are approved.
Fixes #107
Added Advance Options / User preferences for embed view
Users can now select/unselect the following options to toggle their rendering in the embed view:
Screen.Recording.2024-05-16.at.5.15.16.PM.mov
Summary by CodeRabbit
New Features
Style