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

docs: playground #4021

Merged
merged 16 commits into from
Dec 8, 2023
Merged

docs: playground #4021

merged 16 commits into from
Dec 8, 2023

Conversation

m0ksem
Copy link
Collaborator

@m0ksem m0ksem commented Nov 21, 2023

closes #4018
closes #3702
closes #3162

Removed broken Codesandbox and added playground on ui.vuestic.dev.

New button: (not sure about icon tho)
image

Playground for component example looks like a modal:

http://localhost:3000/ui-elements/button

image

After user changed something in playground, it can be shared via url. Url looks like:

http://localhost:3000/play

image

I use vue-repl here to make a sandbox. We need a complete ES build in one file for vue-repl, so I build one in nuxt module before docs build start. Vue-repl makes it easy to share state between pages using serialization. So we don't need to store user's changes on backend - it is stored in url.
When user open playground from code example in modal url changes to ui.vuestic.dev/play#state so it can be easily shared. When modal is closed, url changes back to docs page.

I believe this will help users to make reproduction easier.

Sandbox supports tailwind, but will not allow installing additional dependencies, what I think OK.


This PR also closes #4019, I found out this problem when tried to use our es module from CDN.


Downside of this PR is that for now, it is impossible to test not latest vuestic version. In such case, I think user still able to make codesandbox reproduction.

@Roman4437
Copy link
Contributor

There's an overflow issue
image

@Roman4437
Copy link
Contributor

Refreshing the page is causing the modal to break

@Roman4437
Copy link
Contributor

during focus or selection, a default outline appears

@Roman4437
Copy link
Contributor

The background is static and doesn't change with the theme. Also, white background doesn't look good with elements that have dropdowns

@Roman4437
Copy link
Contributor

Some components are not working properly, such as the date-picker or table

@m0ksem m0ksem requested a review from Roman4437 November 22, 2023 05:21
@Roman4437
Copy link
Contributor

tailwind classes works unless they are custom or not defined through the docs

@m0ksem
Copy link
Collaborator Author

m0ksem commented Nov 23, 2023

tailwind classes works unless they are custom or not defined through the docs

I updated PR, might be fixed. Can you share an example where the issue happens? Thanks.

@Roman4437
Copy link
Contributor

tailwind classes works unless they are custom or not defined through the docs

I updated PR, might be fixed. Can you share an example where the issue happens? Thanks.

It's working properly now

@m0ksem m0ksem mentioned this pull request Nov 23, 2023
packages/docs/pages/play.vue Outdated Show resolved Hide resolved
@m0ksem
Copy link
Collaborator Author

m0ksem commented Nov 26, 2023

Looks like <style lang="*" isn't supported yet by vue-repl.
image

We also need to add config, similar to codesandbox's config, so it can load additional libs, like AGGrid.

@m0ksem m0ksem marked this pull request as draft November 26, 2023 10:48
@m0ksem m0ksem marked this pull request as ready for review December 1, 2023 09:47
Copy link
Member

Choose a reason for hiding this comment

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

Mobile version for modal doesn't work too well (full-screen works fine).

image

I'm thinking we need 2 buttons here:
image copy
image close

Sandbox link I don't think is useful for anything.
I would also suggest not to use primary color for close.

image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think it is a problem caused by VaModal... Moved that to @VasylHryha.

@asvae
Copy link
Member

asvae commented Dec 6, 2023

For Asva to finish:

Master → 1.8.4

Develop → compiled (npm)

Experimental → compiled (npm)

Master → [1.8.3, 1.8.4]

Develop → [1.8.3, 1.8.4, 1234567a, 123567b]

play - source code

play - vuestic-version


  • Some examples still use old codesandbox - we need to cover that.

@m0ksem
Copy link
Collaborator Author

m0ksem commented Dec 7, 2023

For Asva to finish:

Master → 1.8.4

Develop → compiled (npm)

Experimental → compiled (npm)

Master → [1.8.3, 1.8.4]

Develop → [1.8.3, 1.8.4, 1234567a, 123567b]

play - source code

play - vuestic-version

  • Some examples still use old codesandbox - we need to cover that.

I have a PR for build tool. Let's deal with it later, when my PR is merged. It will be easy to add a esm-browser build, which we could use from npm.

@m0ksem m0ksem removed the request for review from Roman4437 December 7, 2023 17:52
@asvae
Copy link
Member

asvae commented Dec 8, 2023

I moved everything we discussed to this issue. So we can merge this PR.

@asvae asvae merged commit 00cce4d into epicmaxco:develop Dec 8, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants