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 3 commits 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)

Signed-off-by: sari weinberger <sn0533129699@gmail.com>
Copy link

codecov bot commented Oct 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.98%. Comparing base (b654645) to head (c578186).
Report is 244 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2109      +/-   ##
==========================================
+ Coverage   39.20%   41.98%   +2.78%     
==========================================
  Files         146      175      +29     
  Lines        4857     5630     +773     
  Branches     1164     1394     +230     
==========================================
+ Hits         1904     2364     +460     
- Misses       2939     3250     +311     
- Partials       14       16       +2     
Flag Coverage Δ
client 41.98% <ø> (+2.78%) ⬆️
server ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

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

Apart from the shifted alignment, the action column changes LGTM

Signed-off-by: sarinailinger <sn0533129699@gmail.com>
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.

Thank you for improving the diff and sorry for requesting changes in the code that you did not touch. I got tricked by the diff while reviewing in the browser. Fortunately @sjd78 has noticed that.
Looking at the new version I have some comments but the code worked for me and it looks good.

@@ -388,7 +390,7 @@ export const MigrationWaves: React.FC = () => {
}
numRenderedColumns={numRenderedColumns}
>
{currentPageItems?.map((migrationWave, rowIndex) => (
{currentPageItems?.map((migrationWave, rowIndex) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We are using implicit return now which may cause problems in some scenarios - compare:

()=> {<Foo/>;}
// vs 
() => <Foo/>

if the component Foo takes multiple lines then it's wrapped in extra braces (())

</Td>
<Td isActionCell id="row-actions">
<ActionsColumn
open={isRowDropdownOpen === migrationWave.id}
Copy link
Collaborator

Choose a reason for hiding this comment

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

The open prop is not needed here. Please also remove the isRowDropdownOpen flag and setter (line 89) as they are dead code now.

@rszwajko
Copy link
Collaborator

rszwajko commented Nov 6, 2024

@mguetta1
not that on small screens we suffer the same problems as with ControlTableActionButtons component but we won't benefit from #2145 .
Perhaps we need to folow-up and make ControlTableActionButtons more generic?

@mguetta1
Copy link
Collaborator

mguetta1 commented Nov 6, 2024

@rszwajko noted.
It is the same case also in application inventory page, which was fixed in #2145

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.

4 participants