littlehorse-enterprises / littlehorse

This repository contains the code for the LittleHorse Server, Dashboard, CLI, and Java/Go/Python SDK's. Brought to you by LittleHorse Enterprises LLC
https://littlehorse.dev/
Other
119 stars 11 forks source link

feat(dashboard): debloat wfspec view #1123

Closed bryson-g closed 4 days ago

bryson-g commented 1 week ago

resolves #941

Before

image

After

https://github.com/user-attachments/assets/bc278637-57c1-4833-a4f6-9663b90098fe

Explanation

image

Considerations

The version dropdown may become difficult to navigate as versions accumulate. Potential improvements:

Additional Thoughts & Ideas

First Draft

As a first draft, I was considering a concept like this:

https://github.com/user-attachments/assets/44592cb3-da1a-4871-a5aa-d8e05951a91e

While the above first draft solution technically does resolve the original problem, I realized there could be a more eloquent approach.

Potentially Another Design

I know the data provided to display workflows is fairly minimal (just versions and workflow names), but if it were ever expanded to include more detailed information, such as last modified or last ran, then it may be worth considering a more table orientated design. Additionally, this approach would allow for an intuitive way to filter for specific WfSpecs, provided there is relevant data to filter through.

Shadcn's table example: https://ui.shadcn.com/docs/components/table image

coltmcnealy-lh commented 1 week ago

Thanks @bryson-g! You get 10 points for the best PR description I've ever seen.

I'm not a frontend developer, so I can't review the code, but Hazim or Mijaíl will get to it tomorrow.

bryson-g commented 1 week ago

Thanks @bryson-g! You get 10 points for the best PR description I've ever seen.

I'm not a frontend developer, so I can't review the code, but Hazim or Mijaíl will get to it tomorrow.

Thanks. You get 10 points for the best reaction to a PR I've ever seen. I work with ~old people~ aged gentlemen, respectfully, so this is refreshing to see some young whipper snapper energy.

bryson-g commented 1 week ago

@mijailr, Continuing from the conversation we had:

As one of the potential solutions for this pagination issue, we considered paginating through every page to ensure the latest workflow for each unique WfSpec.

However, I believe it would be more efficient to use the GetLatestWfSpec RPC instead. For example, loading the first 10 items and filtering for unique names, then calling the GetLatestWfSpec RPC for each listed WfSpec.

The one problem I see with the latter approach is that the Items per load number may be lower than the number of WfSpecs that are actually rendered on the page. This may be slightly confusing for users. When compared to the former approach, we already paginate through all of the WfSpecs, so we could display all unique WfSpecs in a scroll area and completely remove the Items per load option.

What are your thoughts on how exactly how we should proceed?

HazimAr commented 4 days ago

@bryson-g please fix tests and then its ready to merge

bryson-g commented 4 days ago

@HazimAr tests passed now. had to delete package-json.lock and push a new clean install. lmk if this is fine with u