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

Fix ui titles for typespec #389

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions docs/assets/diagrams/src/archutecture.puml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ AddElementTag("AazRepo", $bgColor="#2c858a", $borderColor="#7bb0b3")

AddElementTag("Boundary", $bgColor="#f0f0f0")


Person(developer, "CLI Developer")

Boundary(api, "API Specs") {
SystemDb(swagger, "Swagger 2.0", "Repo", "", "Repo", $tags="Repo")
SystemDb(other_specs, "Other Source", "Repo", "", "Repo", $tags="FetureRepo")
SystemDb(typespec, "Typespec", "Repo", "", "Repo", $tags="Repo")
SystemDb(other_specs, "Other API Specs", "Repo", "", "Repo", $tags="FetureRepo")
}

Lay_D(swagger, other_specs)

Lay_D(swagger, typespec)
Lay_D(typespec, other_specs)

Boundary(aazdev, "AAZ Dev Tool") {
Boundary(models, "Command Models") {
Expand All @@ -49,7 +49,8 @@ Boundary(aazdev, "AAZ Dev Tool") {
}
Boundary(translator, "API Translators", "", "") {
Container(swagger_translator, " Swagger 2.0\nTranslator", "", "", $tags="CodeGenPart")
Boundary(other_translator, "Other Source\nTranslator", "", "", $tags="FetureCodeGenPart")
Container(typespec_translator, " Typespec Emitter\nTranslator", "", "", $tags="CodeGenPart")
Boundary(other_translator, "Other API Specs\nTranslator", "", "", $tags="FetureCodeGenPart")
}
}

Expand All @@ -65,13 +66,13 @@ Lay_R(editor, generator)
Lay_D(editor, models)
' Lay_R(aaz, cli_generator)

Lay_D(swagger_translator, other_translator)
Lay_D(swagger_translator, typespec_translator)
Lay_D(typespec_translator, other_translator)

Lay_D(cli_generator, cli_extension_generator)

Lay_D(cli_extension_generator, other_generator)


Boundary(cli, "CLI Commands") {
SystemDb(azure_cli, "Azure CLI", "Repo", "", "Repo", $tags="Repo")
SystemDb(azure_cli_extension, "Azure CLI\nExtension", "Repo", "", "Repo", $tags="Repo")
Expand Down Expand Up @@ -101,8 +102,11 @@ cli_extension_generator <-[#Green,thickness=2]l-> azure_cli_extension
developer -[#DarkGreen,thickness=2]d-+ editor
developer -[#DarkGreen,thickness=2]d-+ generator

typespec -[#Green,thickness=2]l-> typespec_translator
typespec_translator -[#Green,thickness=2]l-> workspace

other_specs .[#Green]l.> other_translator
other_translator .[#Green]u.> workspace
other_translator .[#Green]l.> workspace

aaz .[#Green]d.> other_generator
other_generator <.[#Green]l.> other_repo
Expand Down
6 changes: 3 additions & 3 deletions docs/pages/usage/workspace_editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ Here's an example of `Microsoft.Attestation` data-plane client configuration usi
If you want do some modification in existing client configuration, you can click the `Edit Client Config` button. The change will apply to all the data-plane commands of that resource-provider when you export models from the workspace to aaz.
![edit_client_config](../../assets/recordings/workspace_editor/dataplane_edit_client_config.gif)

## Add Swagger Resources
## Add Swagger/TypeSpec Resources

When an empty workspace is opened, the `Add Swagger Resources` page will be prompted out by default.
When an empty workspace is opened, the `Add Resources` page will be prompted out by default.

For a workspace contains commands, click the `+` button besides the `command tree`, the `Add Swagger Resources` page will prompted out as well.
For a workspace contains commands, click the `+` button besides the `command tree`, the `Add Resources` page will prompted out as well.

![prompt_add_swagger_resources_page](../../assets/recordings/workspace_editor/prompt_add_swagger_resources_page.gif)

Expand Down
6 changes: 3 additions & 3 deletions src/web/src/views/home/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ function HomePage() {
</Step>
<Step>
<StepButton color="inherit" onClick={handleStep(1)}>
{"Prepare Swagger"}
{"Prepare Swagger/TypeSpec"}
</StepButton>
<StepContent>
<StepContentTypography>
{"The definition of API in swagger is required before using AAZDev tool."}
{"The definition of API in swagger/TypeSpec is required before using AAZDev tool."}
</StepContentTypography>
<StepContentTypography>
{"Please make sure the API specs has been defined in "}
Expand Down Expand Up @@ -139,7 +139,7 @@ function HomePage() {
{"Model editors can help you build command models."}
</StepContentTypography>
<StepContentTypography>
{"To build command models from swagger,"}
{"To build command models from swagger/TypeSpec,"}
</StepContentTypography>
<StepContentTypography>
{"please use "}
Expand Down
2 changes: 1 addition & 1 deletion src/web/src/views/workspace/WSEditorSwaggerPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ class WSEditorSwaggerPicker extends React.Component<WSEditorSwaggerPickerProps,
<CloseIcon />
</IconButton>
<Typography sx={{ ml: 2, flex: 1, flexDirection: "row", display: "flex", justifyContent: "center", alignContent: "center" }} variant='h5' component='div'>
Add Swagger Resources
Add Resources
</Typography>
</Toolbar>
</AppBar>
Expand Down