-
Notifications
You must be signed in to change notification settings - Fork 45
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-2550: Add from one machine to many how-to #3201
Conversation
docs/use-cases/one-to-many.md
Outdated
|
||
{{< table >}} | ||
{{% tablestep link="/configure/" %}} | ||
{{<imgproc src="/use-cases/one-to-many/config.png" resize="700x" class="fill alignleft" style="max-width: 250px" declaredimensions=true alt="Configuration builder UI">}} |
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.
This is an interesting approach but the screenshots are too small to be useful. If Cristina can create something that's great, if not I think use the full screenshots and add them in each step rather than to the side. Like in https://docs-test.viam.dev/3201/use-cases/configure/.
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.
Alternatively what we could do is keep these as small screenshots and make them clickable to expand
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.
#3206 adds functionality for it either way
docs/use-cases/one-to-many.md
Outdated
{{<imgproc src="/use-cases/one-to-many/noun-reset.svg" class="fill alignleft" style="max-width: 100px" declaredimensions=true alt="Reset to fragment">}} | ||
**2. (Optional) Revert fragment modifications** | ||
|
||
When you make edits to fields in your machine's config, a top-level section called `"fragment_mods"` is added to your JSON config with [update operators](https://www.mongodb.com/docs/manual/reference/operator/update/positional/#---update-) that modify each field you edit. |
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.
Please check Natalia's email on "overwrite fragments". I believe this has a UI now
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.
Yes, it does, and I have them use the UI in step 1 but didn't realize there was a revert button because I didn't see it yesterday :D Yay!
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.
(done)
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.
Good start. Just need to tidy up images and overwrites
@@ -175,170 +130,177 @@ This example assumes the fragment with ID `abcd7ef8-fa88-1234-b9a1-123z987e55aa` | |||
5. Add any update operators you'd like to apply to the fragment to the `mods` section. | |||
Click to view each example: | |||
|
|||
{{< expand "Change the name and attributes of a component" >}} | |||
This example uses [`$set`](https://www.mongodb.com/docs/manual/reference/operator/update/set/#mongodb-update-up.-set) to make the following changes to the attributes of a motor named `motor1`: | |||
{{< expand "Change the name and attributes of a component" >}} |
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.
Note to reviewers: I didn't change any of the expander content, just un-indented to fix formatting bug after putting this into tabbed content
docs/fleet/fragments.md
Outdated
@@ -9,6 +9,10 @@ aliases: | |||
- /fleet/configure-a-fleet/ | |||
--- | |||
|
|||
{{< cards >}} |
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.
I think this needs to have some intro
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.
eh?
{{< cards >}} | |
_This page contains reference information. | |
For a how-to guide, click here:_ | |
{{< cards >}} |
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.
Or, a la data capture:
{{< cards >}} | |
Get started with a how-to guide or keep reading for more details. | |
{{< cards >}} |
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.
I think the second but maybe after line 39?
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.
Okay. Adding a heading back in too for less confusion.
docs/fleet/fragments.md
Outdated
- Copy and paste the contents of the fragment, remove the link to the fragment itself, then modify the config as needed. | ||
- If you use this method, future updates to the fragment _will not_ be automatically pushed to your machine. |
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.
I think possibly this is not an option we should highlight. We only did this as a workaround I think. @nataliajacobowitz what do you think?
docs/fleet/fragments.md
Outdated
{{% alert title="Support Notice" color="note" %}} | ||
|
||
`fragment_mods` are _not_ supported for the modification of [trigger](/configure/triggers/) configuration. | ||
You can create a trigger with a fragment but you cannot modify it with `fragment_mods`. | ||
|
||
{{% /alert %}} | ||
|
||
To configure fragment mods: | ||
### Use `fragment_mods` |
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.
### Use `fragment_mods` | |
### Overwrite fragments to add machine-specific modifications |
I think overwrites is what the feature is called rather than fragment_mods. @nataliajacobowitz - thought?
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.
@JessamyT elet's move forward with overwrites please. Either the above or this:
### Use `fragment_mods` | |
### Overwrite fragment fields |
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.
In fact you could also remove this and the revert fragment mods titles.
docs/use-cases/one-to-many.md
Outdated
|
||
{{% /tablestep %}} | ||
{{% tablestep %}} | ||
{{<imgproc src="/use-cases/one-to-many/trash-can.svg" class="fill alignleft" style="max-width: 50px" declaredimensions=true alt="Delete">}} |
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.
This icon seems a different size to the other one.
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.
yes because the line weights are very different. the larger one is from Cristina and has a much lighter weight to it so making that one small makes it almost disappear. We don't have all the icons that would be useful, but in the interest of moving forward I thought better to work with what we have.
I can just take out all the icons and have no images on the non-screenshot steps if you prefer?
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.
I think it looks fine on mobile but untidy on desktop. Why don't you follow the pattern you've established and take a picture of the delete menu item on a configuration panel?
Good changes, this is getting close. Thanks for the revisions |
docs/use-cases/one-to-many.md
Outdated
|
||
{{< table >}} | ||
{{% tablestep %}} | ||
{{<imgproc src="appendix/try-viam/rover-resources/fragments/fragments_list.png" resize="800x" class="fill alignleft" style="max-width: 300px" declaredimensions=true alt="Add fragment">}} |
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.
I think this should have the imgzoom class
docs/use-cases/one-to-many.md
Outdated
|
||
{{% /tablestep %}} | ||
{{% tablestep %}} | ||
{{<imgproc src="/use-cases/one-to-many/trash-can.svg" class="fill alignleft" style="max-width: 50px" declaredimensions=true alt="Delete">}} |
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.
I think it looks fine on mobile but untidy on desktop. Why don't you follow the pattern you've established and take a picture of the delete menu item on a configuration panel?
docs/use-cases/one-to-many.md
Outdated
|
||
{{< table >}} | ||
{{% tablestep link="/fleet/fragments/#modify-the-config-of-a-machine-that-uses-a-fragment" %}} | ||
{{<imgproc src="/use-cases/one-to-many/edit.svg" class="fill alignleft" style="max-width: 50px" declaredimensions=true alt="Edit">}} |
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.
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.
Mm but they won't see this unless they click advanced... I'll add mention of that
docs/fleet/fragments.md
Outdated
@@ -9,6 +9,10 @@ aliases: | |||
- /fleet/configure-a-fleet/ | |||
--- | |||
|
|||
{{< cards >}} |
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.
I think the second but maybe after line 39?
docs/use-cases/one-to-many.md
Outdated
|
||
{{< table >}} | ||
{{% tablestep link="/fleet/fragments/#modify-the-config-of-a-machine-that-uses-a-fragment" %}} | ||
{{<gif webm_src="/how-tos/fragment-overwrite.webm" mp4_src="/how-tos/fragment-overwrite.mp4" alt="A robot drawing a heart" max-width="500px" class="aligncenter" >}} |
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.
that's very pretty
docs/fleet/fragments.md
Outdated
If you need to modify the config of just one machine that uses a fragment, you have two options: | ||
|
||
- Use `fragment_mods` in your machine's config to overwrite certain fields of the fragment. | ||
- Copy and paste the contents of the fragment, remove the link to the fragment itself, then modify the config as needed. | ||
- If you use this method, future updates to the fragment _will not_ be automatically pushed to your machine. |
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.
Let's just remove it please. The old way was a hack. I am reasonably certain we no longer want to do this:
If you need to modify the config of just one machine that uses a fragment, you have two options: | |
- Use `fragment_mods` in your machine's config to overwrite certain fields of the fragment. | |
- Copy and paste the contents of the fragment, remove the link to the fragment itself, then modify the config as needed. | |
- If you use this method, future updates to the fragment _will not_ be automatically pushed to your machine. | |
If you need to modify the config of one or a few machines that use a fragment, you can overwrite fields of the fragment. |
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.
Please also remove https://docs-test.viam.dev/3201/fleet/fragments/#copy-and-paste-method
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.
Please accept the remaining suggestions and then merge. Thank you - this looks great
Co-authored-by: Naomi Pentrel <[email protected]>
Co-authored-by: Naomi Pentrel <[email protected]>
You can view a rendered version of the docs from this PR at https://docs-test.viam.dev/3201 |
Icons are stand-ins; could replace with more screenshots, and I'm seeing if Cristina has something similar if we want icons not screenshots
https://docs-test.viam.dev/3201/use-cases/one-to-many/