Skip to content
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

feat: events workflow in wizard #969

Merged
merged 8 commits into from
Aug 2, 2024
Merged

feat: events workflow in wizard #969

merged 8 commits into from
Aug 2, 2024

Conversation

Kevin101Zhang
Copy link
Contributor

@Kevin101Zhang Kevin101Zhang commented Aug 1, 2024

added events into launchpad.

@Kevin101Zhang Kevin101Zhang linked an issue Aug 1, 2024 that may be closed by this pull request
@Kevin101Zhang Kevin101Zhang marked this pull request as ready for review August 1, 2024 23:31
@Kevin101Zhang Kevin101Zhang requested a review from a team as a code owner August 1, 2024 23:31
Copy link
Collaborator

@darunrs darunrs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly alright to me. Some comments on code readability. There's natrually going to be little testability to be done here, so mainly relying on the expectation that this has been run locally and works like expected.

@@ -65,6 +65,7 @@ describe('generateCode API', () => {
},
},
],
selectedEvents: [],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there really no other testing that can be performed? It feels odd to see that the only modification to tests needed is adding one line, when enabling some feature.

setLoading(false);
}).catch(error => {
setLoading(false);
setError('There was an error fetching the data');
});
};

const handleSelectUnselectAll = (action) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handleSelectUnselectAll is a really confusing name. Do you mean selecting unselect all? Or it works for both? Could you rename this to something else, closer to what it is actually doing?

@@ -580,20 +513,65 @@ const handleParentChange = (methodName) => {
};

const handleChildChange = (key) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've seen these references to things like parents and children. They do not inherently explain what that is. I feel a lot of this code is really living in a context which is really hard to understand if you weren't the one who wrote it. Instead of using terms like child or parent, I would prefer something more declarative. If parent meant say main method and child is arguments, they should just be referenced that way. Let's try to use more direct self explanatory terms.

Copy link
Contributor Author

@Kevin101Zhang Kevin101Zhang Aug 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-08-02 at 3 56 19 PM

Yeah that makes sense. The intent of the naming here is to mock what happens when a user selects a childcheckbox and parent checkbox.

handleParentChange - parent checkbox should select and unselect all child checkboxes
handleChildChange - child checkbox should just check the parent checkbox

Also a bit out of scope for the naming portion but both functions also have to distinguish between which sets of checkboxes they are targeting. Either the events tab or the methods tab beforehand.

The code is setup in a way where if we choose to display more then 1 level it should work with minimal modifications.

low effort but perhaps?
handleChildCheckboxChange
handleParentCheckboxChange

frontend/widgets/src/QueryApi.Launchpad.jsx Outdated Show resolved Hide resolved
@Kevin101Zhang Kevin101Zhang merged commit 6a1810b into main Aug 2, 2024
4 checks passed
@Kevin101Zhang Kevin101Zhang deleted the 966-launchpad-events branch August 2, 2024 20:39
@Kevin101Zhang Kevin101Zhang linked an issue Aug 2, 2024 that may be closed by this pull request
@darunrs darunrs mentioned this pull request Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add select and unselect * Launchpad Events
2 participants