-
Notifications
You must be signed in to change notification settings - Fork 90
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
SALTO-7067: add accountElements
utility to Workspace
#6963
base: main
Are you sure you want to change the base?
Conversation
accountElements
utility to Workspace (DRAFT)accountElements
utility to Workspace
@@ -185,6 +187,12 @@ export type Workspace = { | |||
uid: string | |||
|
|||
elements: (includeHidden?: boolean, env?: string) => Promise<ElementsSource> | |||
accountElements: (args: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reasoning behind this being a new function and not another param to elements
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it made sense to have a dedicated implementation for a specific account's ElementsSource, where the account name is a required parameter.
Also, while I could add more optional parameters to elements, I think this would make the elements method harder to use, especially since it doesn't use an object parameter, (and changing it to an object parameter would cause a breaking change).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a reason this should be added to the workspace interface
if this is part of a bigger plan, I would like to see what the bigger plan is and why this has to be a part of it
Add accountElements utility to Workspace.
core
toadapter-utils
.Release Notes:
Workspace:
accountElements
that returns ElementsSource of the provided account.User Notifications:
None