Skip to content

feat(site): Add template embed page #7501

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

Merged
merged 5 commits into from
May 15, 2023
Merged

feat(site): Add template embed page #7501

merged 5 commits into from
May 15, 2023

Conversation

BrunoQuaresma
Copy link
Collaborator

@BrunoQuaresma BrunoQuaresma commented May 11, 2023

Preview:
Screen Shot 2023-05-11 at 15 00 55
Screen Shot 2023-05-11 at 15 01 07

@BrunoQuaresma BrunoQuaresma requested a review from bpmct May 11, 2023 18:04
@BrunoQuaresma BrunoQuaresma self-assigned this May 11, 2023
@BrunoQuaresma BrunoQuaresma marked this pull request as ready for review May 12, 2023 13:46
@BrunoQuaresma BrunoQuaresma requested review from a team, Kira-Pilot and rodrimaia and removed request for a team May 12, 2023 13:47
) => Omit<RichParameterInputProps, "parameter" | "index">
} & Pick<ComponentProps<typeof FormSection>, "classes">

export const MultableTemplateParametersSection: FC<
Copy link
Contributor

Choose a reason for hiding this comment

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

mutable instead of multable ( and other places too)

@@ -24,6 +25,13 @@ export const decorators = [
</HistoryRouter>
)
},
(Story) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need this now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is how the new Storybook version recommends using it when creating stories. https://storybook.js.org/docs/react/writing-stories/introduction#defining-stories

Copy link
Member

@bpmct bpmct left a comment

Choose a reason for hiding this comment

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

Just tried it out and it generates nicely. I noticed the sidebar is independently scrollable, yet (on my 2019 MacBook pro) the embed button also needs to be scrolled a bit to see the full thing. Could you compress it a bit so the right side does not need to scroll on most displays?

Screen.Recording.2023-05-15.at.8.30.49.AM.mov

I also saw that, by default, the options are unselected which is nice so that it will use the template default. However, after you select one there is no way to unselect. Thoughts on a "reset" button, or do you think just refreshing it is fine?

@Kira-Pilot
Copy link
Member

This looks great! I was thinking that next time we're adjusting legacy MUI classes, maybe we just port them over to Emotion so that we can eventually rip @mui/styles out.

@BrunoQuaresma
Copy link
Collaborator Author

@bpmct

Could you compress it a bit so the right side does not need to scroll on most displays?

It is because I'm "saying" to CSS to sticky the "button canvas" from the top when it hits 40px. If we stretch the height, the left sidebar, having the form, will also be smaller which for me is not very good since those forms can be quite long. You could easily test that by inspecting the button canvas and removing the option "position: sticky" and adjusting its height.

I also saw that, by default, the options are unselected which is nice so that it will use the template default. However, after you select one there is no way to unselect. Thoughts on a "reset" button, or do you think just refreshing it is fine?

This is an interesting case and maybe for a different task since we are using this same flow when creating a workspace. We might add when the options are not required, an option called "None of the above" or something similar.

@BrunoQuaresma BrunoQuaresma merged commit 6f62204 into main May 15, 2023
@BrunoQuaresma BrunoQuaresma deleted the bq/embed-button branch May 15, 2023 16:07
@github-actions github-actions bot locked and limited conversation to collaborators May 15, 2023
@matifali matifali linked an issue May 15, 2023 that may be closed by this pull request
@matifali matifali added feature site Area: frontend dashboard labels May 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
site Area: frontend dashboard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add "Embed" tab to templates page + improved "Open in Coder" flow
5 participants