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

✨ add ActionsColumn to Migration waves table #2109

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sarinailinger
Copy link

the same actions that there is currently should stay
but delete should be red & edit should be in another button(not in the list)
implement it by ActionsColumn

Signed-off-by: sarinailinger <sn0533129699@gmail.com>
@sarinailinger sarinailinger changed the title :sparkless: add ActionsColumn to Migration waves table ✨ add ActionsColumn to Migration waves table Sep 24, 2024
Copy link
Collaborator

@rszwajko rszwajko left a comment

Choose a reason for hiding this comment

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

There are few changes in this PR. You could actually split it into 3 small PRs.
We can continue in one PR but please describe the changes:

  1. adjust the title to better reflect the changes (the more changes the harder to find good words :) )
  2. list changes in the PR description (first post) here are some examples: 🐛 Fix fetching in InfiniteScroller #2085 or 📖 WSL/Windows setup docs, rework setup docs #2080

I had also few comments/questions to the code (see below)

</DropdownItem>
<ActionsColumn
items={[
// {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please remove commented code.

// },
{
isAriaDisabled:
migrationWave.applications.length === 0,
Copy link
Collaborator

Choose a reason for hiding this comment

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

You use several ways of checking that the applications list is empty - they all OK but for the sake of consistency I would pick one option. My preference would be the one that is already used in the legacy code but feel free to chose.

what: t("terms.applications").toLowerCase(),
}),
onClick: () => {
if (migrationWave.applications.length > 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need this check ? I would expect that isAriaDisabled === true should block clicks.

// onClick: () => setWaveModalState(migrationWave),
// },
{
isAriaDisabled:
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice! I haven't used it yet but isAriaDisabled does bring some advantages over isDisabled

{
isAriaDisabled:
migrationWave.applications?.length < 1 ||
!hasExportableApplications(
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we need to check for both conditions? I haven't tested this flow but looking at the code: when there is no apps then there should also be no exportable apps so the second condition alone would do the job.

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.

2 participants