Comments (17)
My suggestion is to have a switch buttons to view steps as text or as workflow, something like this:
from herbsshelf.
Awesome!
from herbsshelf.
since we have https://github.com/herbsjs/herbs2mermaid now, can we move on with this feature?
from herbsshelf.
I will work on this issue.
from herbsshelf.
Guys, where do you think this diagram should be on the shelf? I think to put it on the bottom of usecase details.
from herbsshelf.
Hello! What do you think about this example?
from herbsshelf.
Wow! great job @maikmb!
(1) is it possible to change the color of the graph? this blue/purple doesn't match the current visual identity.
(2) have you tested with complex UCs (many IFs and/or multi-level steps)?
from herbsshelf.
Well done @maikmb!
For me, we just need to change the colors, nothing more.
from herbsshelf.
Hey guys!
This is an example with Herbs primary color and complex UCs like many Ifs or multi-level-steps. Any more suggestions?
from herbsshelf.
Please open the PR
from herbsshelf.
Wow! its getting very cool!!
One thing that I didn't understand was this part:
Could you post here the code for this use case?
from herbsshelf.
Please open the PR
Hi @jhomarolo, I will implement unit tests to open PR. I need one more day to implement it.
from herbsshelf.
Could you post here the code for this use case?
Hi @dalssoft ! This part refers to Multi-Level Steps.
Step example:
'Send real time events': step({
'Update mobile push notifications': step(async (ctx) => {
return Ok()
}),
'Update payment cart': step(async (ctx) => {
return Ok()
}),
}),
from herbsshelf.
Hey guys, here's the full example with complex Multi-Level Steps.
Flow Chart
Usecase
const updateItem = (injection) =>
usecase('Update Item', {
request: {
id: Number,
description: String,
isDone: Boolean,
position: Number
},
response: Item,
'Validate request': step(async (ctx) => {
return Ok()
}),
'Check if is necessary to update': ifElse({
'If position has changed ': step((ctx) => {
return Ok(true)
}),
'Save itens': step(async (ctx) => {
return Ok()
}),
'Updated item': step(async (ctx) => {
return Ok()
}),
}),
'Notify update item': step(async (ctx) => {
return Ok()
}),
'Calculate stock': step(async (ctx) => {
return Ok()
}),
'Send real time events': step({
'Update mobile push notifications': step(async (ctx) => {
return Ok()
}),
'Update payment cart': step(async (ctx) => {
return Ok()
}),
}),
'Check if has product': ifElse({
'If has product ': step((ctx) => {
return Ok(true)
}),
'Update product item': step(async (ctx) => {
return Ok()
}),
'Create product item': step(async (ctx) => {
return Ok()
}),
}),
'Update cart dashboard': step(async (ctx) => {
return Ok()
}),
'Save product': step({
'Update database': step(async (ctx) => {
return Ok()
}),
'Update cache database': step(async (ctx) => {
return Ok()
}),
}),
})
from herbsshelf.
Is there a PR for this issue? I couldn't find.
from herbsshelf.
Hi @dalssoft,
I will open a PR for this feature. I created a new glue, herbs2mermaid, and configure it for my project to test with shelf.
from herbsshelf.
@maikmb when you finish, please put the pr link here
from herbsshelf.
Related Issues (20)
- Generate documents offline HOT 3
- Array description for Request and Response HOT 2
- Better IF representation HOT 1
- Unnecessary scroll bars when mouse over HOT 1
- Link to Herbs project HOT 1
- Disable shelf in production or protect with password HOT 2
- Icons now showing up HOT 3
- A place to find all my Shelf's HOT 2
- Icons in dark mode HOT 2
- Doc Entities HOT 1
- Herbarium - Use it for discovery HOT 4
- Entities visualization with Mermaid.js HOT 25
- Error when using single quotes on README HOT 3
- Shelf UI improvements HOT 5
- CSS Zoom needs to be improved in entities HOT 5
- Better entity documentation
- Shelf executable.
- Field is displayed as undefined when it is string array HOT 1
- Usecase response is weird when usecase has no request HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from herbsshelf.