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

Block gallery refactor #955

Merged
merged 18 commits into from
Jan 24, 2025
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
369 changes: 239 additions & 130 deletions development/docs/build_block_docs.py

Large diffs are not rendered by default.

79 changes: 79 additions & 0 deletions development/docs/templates/blocks_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
hide:
- toc
---
<script src="https://cdnjs.cloudflare.com/ajax/libs/dompurify/3.0.8/purify.min.js"></script>
<link rel="stylesheet" href="/styles/workflows.css">

<script src="https://kit.fontawesome.com/c9c3956d39.js" crossorigin="anonymous"></script>


<section class="mdx-container portfolio-section">
<div class="md-grid md-typeset">
<div class="text-center">
<h1>Workflow Blocks</h1>
</div>

{% for section in block_sections %}
<div class="section">
<h2>{{ section.title | capitalize }}</h2>
<div class="blocks">
<div class="custom-grid">
{% for block in blocks_by_section[section.id] %}



<a href="{{block.url}}">
<div class="block">

<div class="block_name"> <i class="{{block.icon}}" > </i> {{ block.name }}</div>
<div class="block_description">{{ block.description }}</div>
<!-- <div class="block_license">{{ block.license }}</div> -->
</div>
</a>



{% endfor %}
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</section>

<style>
/* hide edit button for generated pages */
article > a.md-content__button.md-icon:first-child {
display: none;
}

.block {
border: 1px solid black;
border-radius: 4px;
padding: 10px;
height: 100px;
}

.block_name {
font-size: large;
color: black;
}

.block_description {
font-size: 0.65em;
padding-top: 5px;
color: #444;
}

.block_license {
background-color: #14b8a6;
color: #fff;
padding: 2px 4px;
border-radius: 4px;
font-size: small;
}


</style>
4 changes: 4 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
hide:
- toc
---
When the Inference Server is running, it provides OpenAPI documentation at the `/docs` endpoint for use in development.

Below is the OpenAPI specification for the Inference Server for the current release version.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ class DominantColorManifest(WorkflowBlockManifest):
"long_description": LONG_DESCRIPTION,
"license": "Apache-2.0",
"block_type": "classical_computer_vision",
"ui_manifest": {
"section": "classical_cv",
"icon": "far fa-palette",
"blockPriority": 1,
"opencv": True,
},
}
)
image: Selector(kind=[IMAGE_KIND]) = Field(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ class ImageBlurManifest(WorkflowBlockManifest):
"long_description": LONG_DESCRIPTION,
"license": "Apache-2.0",
"block_type": "classical_computer_vision",
"ui_manifest": {
"section": "classical_cv",
"icon": "far fa-droplet",
"blockPriority": 5,
"opencv": True,
},
}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ class BlockManifest(WorkflowBlockManifest):
"long_description": LONG_DESCRIPTION,
"license": "Apache-2.0",
"block_type": "model",
"ui_manifest": {
"section": "model",
"icon": "far fa-text",
"blockPriority": 11,
"inDevelopment": True,
"inference": True,
},
}
)
type: Literal["roboflow_core/ocr_model@v1", "OCRModel"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class BlockManifest(WorkflowBlockManifest):
"license": "Apache-2.0",
"block_type": "sink",
"ui_manifest": {
"section": "model",
"section": "notifications",
"icon": "far fa-envelope",
"blockPriority": 0,
"popular": True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class BlockManifest(WorkflowBlockManifest):
"license": "Apache-2.0",
"block_type": "sink",
"ui_manifest": {
"section": "model",
"section": "data_storage",
"icon": "fal fa-file",
"blockPriority": 3,
"popular": True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ class BlockManifest(WorkflowBlockManifest):
"long_description": LONG_DESCRIPTION,
"license": "Apache-2.0",
"block_type": "transformation",
"ui_manifest": {
"section": "transformation",
"icon": "far fa-crop-alt",
"blockPriority": 1,
},
}
)
type: Literal["roboflow_core/absolute_static_crop@v1", "AbsoluteStaticCrop"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ class DotManifest(ColorableVisualizationManifest):
"long_description": LONG_DESCRIPTION,
"license": "Apache-2.0",
"block_type": "visualization",
"ui_manifest": {
"section": "classical_cv",
"icon": "far fa-palette",
"blockPriority": 1,
"opencv": True,
},
}
)

Expand Down
Loading