-
Notifications
You must be signed in to change notification settings - Fork 3
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
Hide live preview button in storm #348
Merged
Merged
Conversation
This file contains 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
rebase on main
oshi97
reviewed
Aug 24, 2023
oshi97
reviewed
Aug 24, 2023
oshi97
reviewed
Aug 25, 2023
oshi97
approved these changes
Aug 25, 2023
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.
lgtm!
alextaing
added a commit
that referenced
this pull request
Aug 25, 2023
This PR hides the Live preview button and stops pages dev from running when in CBD. This PR also resizes some of the icons in the action bar (info and viewport) since their height made the action bar stretch too tall. Tests were updated by adding `isWithinCBD` to the `virtual_yext-studio` mock. Also `isWithinCBD` was moved from `GitData` into `StudioData`, and was also updated in tests. See [this test site](https://www.yext.com/s/3350634/sitesgit/82218/b/hide-live-preview-button). **Live preview button does not appear in CBD and pages dev does not spawn** ![image](https://github.com/yext/studio/assets/59857107/572b3daa-9eaa-4c6d-b184-7f87ccdde3bf) ![image](https://github.com/yext/studio/assets/59857107/24519a86-5328-4dbd-89b1-f1354e885f8c) **Live preview button does appear locally and pages dev does spawn** ![image](https://github.com/yext/studio/assets/59857107/ae2ade1d-e2d5-492d-99ac-9c13f4151943) <img width="958" alt="image" src="https://github.com/yext/studio/assets/59857107/8b494cc8-f489-4023-bb9f-5d2f204a001d"> J=SLAP-2891 TEST=manual
tmeyer2115
added a commit
that referenced
this pull request
Aug 28, 2023
## Features - An Info button was added next to the Live Preview button. When clicked, this displays the version number of Studio. (#346) - Number-type Props now have a Field Picker. (#344) ## Changes - The Live Preview button is now hidden when Studio is run in Storm. The PagesJS Dev Server is also not started. (#348) - Studio now supports PagesJS `^1.0.0-rc.1`. (#341) ## Bug Fixes - Immer is now correctly installed as a direct dependency of Studio. (#349)
oshi97
added a commit
that referenced
this pull request
Aug 30, 2023
This PR updates our parsing classes to avoid dynamically add source files to the project during initial parsing. Instead, we specify a path to the user's tsconfig, so that ts-morph can add them all at once on startup. Originally, I wanted to never dynamically add source files. However, this is still necessary for when we add new files, at least not without reworking at least a good portion of how we write to file. This speeds up initial parsing because every time a source file is added to the project (for instance via `addSourceFileAtPath` like we were doing), ts-morph will recreate the entire typescript compiler Project instance, which is a slow operation. I update the unit test workflow to split up the studio/studio-plugin tests, and also turn off coverage collection to speed up tests. We can turn it back on when we actually do something with it. We can also drop down the playwright test timeout now. The performance improvements here help, and also when we [updated the pages dev startup to use the api](#348) instead of a spawnSync. J=SLAP-2909 TEST=manual my local test-site has speed up to ~6 second start time, down from ~18 seconds --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
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.
This PR hides the Live preview button and stops pages dev from running when in CBD. This PR also resizes some of the icons in the action bar (info and viewport) since their height made the action bar stretch too tall.
Tests were updated by adding
isWithinCBD
to thevirtual_yext-studio
mock. AlsoisWithinCBD
was moved fromGitData
intoStudioData
, and was also updated in tests.See this test site.
Live preview button does not appear in CBD and pages dev does not spawn
![image](https://private-user-images.githubusercontent.com/59857107/263031418-572b3daa-9eaa-4c6d-b184-7f87ccdde3bf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2NDU1MzgsIm5iZiI6MTczOTY0NTIzOCwicGF0aCI6Ii81OTg1NzEwNy8yNjMwMzE0MTgtNTcyYjNkYWEtOWVhYS00YzZkLWIxODQtN2Y4N2NjZGRlM2JmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDE4NDcxOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU5MDMyYTIxNTM2MTNiZTQwMDIxNDI2ODYxZDVhNjFkZWM1OWNjMWJhNDMzN2MyYjI3NDJhNTRjYzFiODAyNmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.buXL72l2_FZWvuCEvliFWaQ6UGIkNp1rTS2S4hU2Scs)
![image](https://private-user-images.githubusercontent.com/59857107/263031308-24519a86-5328-4dbd-89b1-f1354e885f8c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2NDU1MzgsIm5iZiI6MTczOTY0NTIzOCwicGF0aCI6Ii81OTg1NzEwNy8yNjMwMzEzMDgtMjQ1MTlhODYtNTMyOC00ZGJkLTg5YjEtZjEzNTRlODg1ZjhjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDE4NDcxOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJhMWQ0YTc0MjlhNGU1ZWNkYjViNDM2ZmU3ZTgxYmJkZmUzY2MxMTg2Mjg5M2I3ZGEyMTIwNmJkM2NmMmJmNmMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.QUzQpM4nOs42diHb3ogRattfbLGxuR4E9WK3o_GywCI)
Live preview button does appear locally and pages dev does spawn
![image](https://private-user-images.githubusercontent.com/59857107/263032289-ae2ade1d-e2d5-492d-99ac-9c13f4151943.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2NDU1MzgsIm5iZiI6MTczOTY0NTIzOCwicGF0aCI6Ii81OTg1NzEwNy8yNjMwMzIyODktYWUyYWRlMWQtZTJkNS00OTJkLTk5YWMtOWMxM2Y0MTUxOTQzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDE4NDcxOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY5NDAwOWE4NzQ0OTRkYjkxOWM3MWQ4YTI1ZmRkZjg5MzU4MzNhMjJhOTUzYmQzNjQyMjA1MmIwNjA1M2JiYmYmWC1BbXotU2lnbmVkSGVhZG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