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

Separate yext/studio into yext/studio-ui #364

Merged
merged 25 commits into from
Sep 20, 2023
Merged

Conversation

oshi97
Copy link
Contributor

@oshi97 oshi97 commented Sep 1, 2023

This PR separates the react and zustand code into yext/studio-ui.
A future PR will replace the typescript compiler with a bundler, which will reduce round trips done by the vite dev server
and also allow us to minify the code.

generateTailwindSafelist had to be moved into studio-plugin, otherwise postcss would complain about things like window not existing. This was due to postcss importing all of studio-ui when it tries to import generateTailwindSafelist, and postcss running on node while studio-ui expecting to be run in the browser. Previously, it would directly
import the ts file, and rely on whatever transpilation postcss/tailwind are doing.

J=SLAP-2919
TEST=manual

dev flow still works - I can make an edit in studio-ui with the dev watch running and the test-site will receive updates
it's a full page reload every time now though

@oshi97 oshi97 changed the title wip Seperate yext/studio tsx into yext/studio-ui package Sep 5, 2023
@oshi97 oshi97 changed the title Seperate yext/studio tsx into yext/studio-ui package Separate yext/studio tsx into yext/studio-ui package Sep 5, 2023
@oshi97 oshi97 changed the title Separate yext/studio tsx into yext/studio-ui package Separate yext/studio into yext/studio-ui Sep 5, 2023
@oshi97 oshi97 marked this pull request as ready for review September 5, 2023 16:09
@oshi97 oshi97 requested a review from a team September 5, 2023 16:09
@alextaing
Copy link
Contributor

lgtm 🔥 but @nmanu1, do you want to take a gander?

packages/studio/package.json Show resolved Hide resolved
packages/studio/package.json Show resolved Hide resolved
packages/studio-ui/tsconfig.json Show resolved Hide resolved
packages/studio-ui/package.json Show resolved Hide resolved
packages/studio-ui/package.json Outdated Show resolved Hide resolved
packages/studio/package.json Outdated Show resolved Hide resolved
packages/studio-ui/src/App.tsx Outdated Show resolved Hide resolved
update-minor-versions.mjs Outdated Show resolved Hide resolved
oshi97 and others added 8 commits September 15, 2023 14:25
This PR removes top-level fragments from the component tree of each layout in the layout slice so they won't be displayed in the UI when adding a layout to a new page. HMR is also updated to re-sync layouts in the store when a layout file is changed or a full sync is performed.

J=SLAP-2937
TEST=manual

In the test-site, saw that if `LocationLayout` had a top-level fragment, it was not present in the component tree in the `layouts` record. Also, checked that updating `LocationLayout` while running the test-site would correctly update it's component tree in the store.
@alextaing
Copy link
Contributor

Things look good to me! 🥳

@oshi97 oshi97 merged commit fed1e42 into main Sep 20, 2023
15 checks passed
@oshi97 oshi97 deleted the dev/separate-ui-package branch September 20, 2023 14:37
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.

3 participants