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

Feat(sandboxSpace): Improve Playground Layout and Introduce Toggleable Sandbox Component #58

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ketsebaoteth
Copy link
Contributor

@ketsebaoteth ketsebaoteth commented Jan 29, 2025

Summary

This pull request improves the playground and adds a sandbox component for faster animation testing.

Changes

1. Playground Layout:

  • Changed layout from flex-col to flex for horizontal arrangement.
  • The animation link items in the playground were previously flex-columned, and the list was getting long with the addition of more items.
  • Now the playground occupies the full page width.
    - Reasoning: To reduce the vertical length of the animation list and enable a more compact, horizontal layout using full-width.

2. Sandbox Component:

  • Added a toggleable Sandbox component within components/sandbox/content.vue.
  • It's a div where you can quickly put animation code and preview it.
    - Enabled by a toggle button
  • ** Reasoning: ** Provides a single, clean file for easy testing of animations, making it easier to quickly see how changes affect animation behaviours in a contained space.

3. Styling:

  • Added button styles to tailwind.css.
  • Moved gradient style to tailwind.css.
    • ** Reasoning: ** To improve organization and consistency of styles across the project.

Benefits

  • Reduces vertical scrolling of the playground and makes better use of horizontal screen space.
  • Provides a straightforward place to experiment with animation code. NO NEED TO REFRESH PAGE TO REPLAY!
  • Maintains consistent styling by grouping styling components together.

Impact

These changes are non-breaking and aim to improve the development experience.

Testing

These changes were tested and are responsive to different screen sizes.

Next Steps

Future enhancements to the sandbox may include an easy way to add controllers for animation properties (e.g., sliders), with the goal of simplifying the process by something like sandbox.registerProp(myScale) to create interactive sliders directly.

screeshots

image
image

Note: I am new to open source contributions. Feedback and advice on best practices are welcome!

playground/nuxt/assets/css/tailwind.css Outdated Show resolved Hide resolved
playground/nuxt/assets/css/tailwind.css Outdated Show resolved Hide resolved
@@ -2,6 +2,7 @@
export default defineNuxtConfig({
compatibilityDate: '2024-04-03',
devtools: { enabled: true },

Choose a reason for hiding this comment

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

Enabling devtools in a production environment can pose security risks by potentially exposing sensitive information. It's recommended to conditionally enable devtools based on the environment. For example:

devtools: { enabled: process.env.NODE_ENV === 'development' }

This ensures that devtools are only enabled in development environments.

playground/nuxt/nuxt.config.ts Show resolved Hide resolved
@ketsebaoteth
Copy link
Contributor Author

it appears that the tests were already failing on the main branch before my changes. I'd appreciate it if you could verify this so I can ensure my changes are also passing.

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