Project

General

Profile

Actions

Feature #23179

closed

Rework renderer types using GroupContentsResource

Added by Stephen Smith 6 months ago. Updated 6 months ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Workbench
Target version:
Story points:
-
Release relationship:
Auto

Description

In the renderer, there's some tech debt where renderName, renderIcon, and some other stuff is built around the GroupContentsResource. We should change these to be more generic, use an interface where specific fields (name) are assumed, and improve type guards.


Subtasks 1 (0 open1 closed)

Task #23184: Review 23179-renderer-types-rebase-1ResolvedStephen Smith10/07/2025Actions

Related issues 1 (0 open1 closed)

Related to Arvados - Feature #22820: Ability to create, edit and delete external credentials in workbenchResolvedLisa KnoxActions
Actions #1

Updated by Stephen Smith 6 months ago

  • Related to Feature #22820: Ability to create, edit and delete external credentials in workbench added
Actions #2

Updated by Stephen Smith 6 months ago

  • Target version changed from Development 2025-10-01 to Development 2025-10-15
Actions #3

Updated by Stephen Smith 6 months ago

  • Subtask #23184 added
Actions #4

Updated by Stephen Smith 6 months ago

Changes at arvados|ef8feee09d8053d2ddf86108af733c6ef98aa55f branch 23179-renderer-types-rebase-1
Tests developer-run-tests-services-workbench2: #1632

Skipping the usual rubric since this is purely code cleanup with no functional changes

  • Did some normalizing of type guards, it's convenient to have them all do an undefined check to keep other code terse, and where possible I use the Resource type as parameter.
  • Created NamedResource interface to use where we expect a resource to have a name, freeing us from using the GroupContentsResource for renderer methods and maintaining type safety (as usual it's the implementer's responsibility to ensure the correct renderer is used in the correct place with named resources so that is unchanged)
Actions #5

Updated by Lisa Knox 6 months ago

These changes are some much-needed improvements to WB typing, thanks for doing this. Just one note:

  • renderers.tsx L147: I'm never a fan of things like switch(true) because it doesn't actually do what a switch statement is meant to do. I think this block would be more concise and readable is we remove the switch and just use a series of if statements.
Actions #7

Updated by Lisa Knox 6 months ago

Strictly speaking, since every if here ends in a return, none of the "else"s are necessary. Other than that, lgtm!

Actions #8

Updated by Stephen Smith 6 months ago

  • Status changed from In Progress to Resolved
Actions #9

Updated by Brett Smith 6 months ago

  • Release set to 79
Actions #10

Updated by Brett Smith 6 months ago

  • Category set to Workbench
  • Tracker changed from Task to Feature
Actions

Also available in: Atom PDF