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

🐛 Fix double tab pane in issue incidents detail modal from PF upgrade #1104

Merged
merged 4 commits into from
Jul 11, 2023

Conversation

mturley
Copy link
Collaborator

@mturley mturley commented Jul 10, 2023

I missed this when reviewing #1078. cc @gildub

I noticed that when clicking an affected file in the drawer on the Issues pages to open the incident details modal, the last tab ("All incidents" table) was split out into its own tab bar and rendered below the contents of the selected tab. This is because of this change: https://github.com/konveyor/tackle2-ui/pull/1078/files#diff-e40974378de11be89b5b1ca02db26b8fed80482f468154ebb84807af7f0e7273L125-R147 (link takes a while to scroll the diff after loading)

When I reversed the change, I saw the reason for it: the new Tabs component doesn't like to have its children expressed as a combination of an array and extra nodes (like we had been doing when mapping over the first 5 incidents and conditionally including a 6th tab). It gave this error:

Screenshot 2023-07-10 at 3 38 00 PM

It appears to be due to this type change in PF: patternfly/patternfly-react#8217

The solution was to make sure the children of <Tabs> is always a single array of <Tab> elements.

@mturley mturley marked this pull request as draft July 10, 2023 19:43
@codecov
Copy link

codecov bot commented Jul 10, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (1af3f9d) 44.04% compared to head (c14e3e1) 44.04%.

❗ Current head c14e3e1 differs from pull request most recent head cdd1c33. Consider uploading reports for the commit cdd1c33 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1104   +/-   ##
=======================================
  Coverage   44.04%   44.04%           
=======================================
  Files         177      177           
  Lines        4493     4493           
  Branches     1007     1007           
=======================================
  Hits         1979     1979           
  Misses       2503     2503           
  Partials       11       11           
Flag Coverage Δ
unitests 44.04% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mturley mturley force-pushed the fix-incident-modal-tabs branch 2 times, most recently from 69f1e53 to bed7b84 Compare July 10, 2023 19:49
@mturley mturley marked this pull request as ready for review July 10, 2023 19:50
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.

Just a thought on an alternate form

Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu>
Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu>
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.

So pretty! LGTM

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.

3 participants