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

Change docs structure v3.0 (#3722) #3723

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/check_python_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def parse(type, names):
# Parse the Docs site's service page
if args.local:
if type == "app" or type == "robot":
with open(f"dist/appendix/apis/{service}/index.html") as fp:
with open(f"dist/dev/reference/apis/{service}/index.html") as fp:
soup2 = BeautifulSoup(fp, 'html.parser')
else:
if service in services_page_mapping.keys():
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/update_sdk_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ def link_data_types(sdk, data_type_string):

## Link matching text, used in write_markdown():
## NOTE: Currently does not support formatting for link titles
## (EXAMPLE: bolded DATA tab here: https://docs.viam.com/appendix/apis/data-client/#binarydatabyfilter)
## (EXAMPLE: bolded DATA tab here: https://docs.viam.com/dev/reference/apis/data-client/#binarydatabyfilter)
def link_description(format_type, full_description, link_text, link_url):

## Supports 'md' link styling or 'html' link styling.
Expand Down Expand Up @@ -1830,23 +1830,23 @@ def write_markdown(type, names, methods):
if type == 'component':
## Replace underscores, and convert generic_component to just generic:
resource_adjusted = resource.replace('generic_component', 'generic').replace('_','-')
proto_anchor_link = '/appendix/apis/components/' + resource_adjusted + '/#' + proto_link
proto_anchor_link = '/dev/reference/apis/components/' + resource_adjusted + '/#' + proto_link
elif type == 'service' and resource in ['base_remote_control', 'motion', 'navigation', 'slam', 'vision']:
proto_anchor_link = '/appendix/apis/services/' + resource.replace('base_remote_control', 'base-rc') + '/#' + proto_link
proto_anchor_link = '/dev/reference/apis/services/' + resource.replace('base_remote_control', 'base-rc') + '/#' + proto_link
elif type == 'service' and resource == 'data_manager':
proto_anchor_link = '/appendix/apis/services/data/#' + proto_link
proto_anchor_link = '/dev/reference/apis/services/data/#' + proto_link
elif type == 'service' and resource == 'generic_service':
proto_anchor_link = '/appendix/apis/services/generic/#' + proto_link
proto_anchor_link = '/dev/reference/apis/services/generic/#' + proto_link
elif type == 'service' and resource == 'mlmodel':
proto_anchor_link = '/appendix/apis/services/ml/#' + proto_link
proto_anchor_link = '/dev/reference/apis/services/ml/#' + proto_link
elif type == 'app' and resource == 'app':
proto_anchor_link = '/appendix/apis/fleet/#' + proto_link
proto_anchor_link = '/dev/reference/apis/fleet/#' + proto_link
elif type == 'app' and resource in ["billing", "mltraining"]:
proto_anchor_link = '/appendix/apis/' + resource.replace('mltraining','ml-training') + '-client/#' + proto_link
proto_anchor_link = '/dev/reference/apis/' + resource.replace('mltraining','ml-training') + '-client/#' + proto_link
elif type == 'app' and resource in ["data", "dataset", "data_sync"]:
proto_anchor_link = '/appendix/apis/data-client/#' + proto_link
proto_anchor_link = '/dev/reference/apis/data-client/#' + proto_link
elif type == 'robot':
proto_anchor_link = '/appendix/apis/' + resource + '/#' + proto_link
proto_anchor_link = '/dev/reference/apis/' + resource + '/#' + proto_link

## Fetch just the first sentence from the proto_override_file (first text string terminated by '.\n'), ignoring hugo
## shortcodes like alerts ('{{%.*%}}.*{{% \[a-b].* %}}'), which precede some override files' (proto descriptions')
Expand Down
Binary file modified assets/build/program/sdks/log-level-info.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions assets/js/howtos.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ let refinementLists = [customRefinementList({
items: [
{ label: "Data Management", value: "data" },
{ label: "Machine Learning", value: "ml" },
{ label: "Core", value: "core" },
{ label: "Control hardware", value: "core" },
{ label: "Fleet Management", value: "fleet" },
{ label: "Registry", value: "registry" },
{ label: "Integrate other hardware", value: "registry" },
{ label: "Mobility", value: "mobility" },
],
}),
Expand Down
20 changes: 17 additions & 3 deletions assets/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ var siteMenuSubmenus = document.getElementsByClassName(
);

function submenuToggle(menu, toggle) {
console.log(menu)
let open = false;
if (toggle.children[0].className === "fas fa-chevron-right") {
open = true;
Expand All @@ -17,16 +18,29 @@ function submenuToggle(menu, toggle) {
}

// add or remove collapse class to children
let immediateChildren = menu.querySelector("ul").children;
let menuChildren = menu.querySelector("span>ul").children;
if (open) {
for (let c of immediateChildren) {
for (let c of menuChildren) {
c.classList.remove("collapse");
}
} else {
for (let c of immediateChildren) {
for (let c of menuChildren) {
c.classList.add("collapse");
}
}
let pageChildren = menu.querySelector("span>div>ul").children;
if (pageChildren) {
if (open) {
for (let c of pageChildren) {
c.classList.remove("collapse");
}
} else {
for (let c of pageChildren) {
c.classList.add("collapse");
}
}
}

}

for (let menu of siteMenuSubmenus) {
Expand Down
Binary file added assets/platform-overviews/build-integrate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/platform-overviews/data-and-AI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/platform-overviews/fleet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/platform-overviews/platform.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading