screwdriver-cd / screwdriver

An open source build platform designed for continuous delivery.
http://screwdriver.cd
Other
1k stars 168 forks source link

Favorites display on homepage #523

Closed petey closed 6 years ago

petey commented 7 years ago

Users should be able to add a set of pipelines to a sharable collection, and display this collection on the main landing page for screwdriver.

petey commented 7 years ago

The current designs for this is to create collections based on ~pipeline keywords~ (#571).

Collections:

Dashboard:

TODO:

edit collections

petey commented 7 years ago

Initial tests with the current API responses requires about 155 requests to fetch data for 46 pipelines. This needs to be remedied by storing more information in events (like status), or creating a separate API, maybe under collections, that aggregates the necessary data in one call.

tkyi commented 7 years ago

User Research Update

Summary

After conducting user research/observations about dashboards, @joelseq and I have come to some conclusions.

Observations

Conclusion

For the first pass at a user dashboard, we think it would be good just to allow users to create and delete Collections (groups/folders) and add and remove pipelines into their Collections. They should be able to view their Collections as well. The Collections should live as a flyout on the left side of the page. Collections should display pipeline name, last event status, and number of open PRs. The user dashboard should be a default page that a user goes to when they go to Screwdriver. Clicking the Screwdriver.cd logo should also take you to that page.

joelseq commented 7 years ago

Here's an updated list of stories based on the research findings and new design:

Collections:

petey commented 7 years ago

I'm not convinced yet that a separate collection page is necessary right now. I believe that the collections flyout should act as "tabs" for the set of pipelines to display on the dashboard. We should give the ability to remove pipelines from the collections flyout ui, not a separate page. As a stretch goal, we could add pipelines to a collection from that pipeline's page.

tkyi commented 6 years ago

After some discussion, here are the endpoints we think the API should have:

  1. POST /collections to create a collection (with name & description & pipelineIds)
  2. PUT /collections/{id} to update a collection; be it editing name or replacing pipelineIds
  3. PATCH /collections/{id}/pipelines to add pipelines - payload would be a body array of pipelines
  4. DELETE /collections/{id}/pipelines to remove pipelines - payload would be a body array of pipelines
  5. DELETE /collections/{id} to delete a collection, along with all data
petey commented 6 years ago

That's a very restful approach to things, but there are two considerations to make:

  1. Is this consistent with any of our other webservice endpoints? We don't have a single endpoint that uses PATCH. We don't have any endpoints that use DELETE except to remove that resource.
  2. What will you use to access these endpoints? Will ember-data use PATCH or DELETE in this way without heavy customization, or do you plan on using services and write everything from scratch?
joelseq commented 6 years ago

After further discussion, we have decided that the following endpoints are what the API will have:

  1. GET /collections to get a list of user's collections (with pipelineIds for each collection)
  2. GET /collections/{id} to get a collection (with pipelines populated)
  3. POST /collections to create a collection (with name & description & pipelineIds)
  4. PUT /collections/{id} to update a collection; be it editing name or description or replacing pipelineIds. NOTE: If you want to add or remove a pipeline you still have to pass in all the other pipelineIds in the payload
  5. DELETE /collections/{id} to delete a collection

We have decided against going with the PATCH /collections/{id}/pipelines and DELETE /collections/{id}/pipelines routes as they are inconsistent with our current approach for specifying endpoints and ember-data does not use PATCH or DELETE in this way out of the box.

tkyi commented 6 years ago

Blog post: http://blog.screwdriver.cd/post/165087198027/introducing-collections