Skip to content

Conversation

@GilbertCherrie
Copy link
Member

@GilbertCherrie GilbertCherrie commented Jul 24, 2024

Fixes: #9218

There is an issue where the textual summary page is being duplicated. This is due to the code:

  if (props.options) {
    document.addEventListener('DOMContentLoaded', () => {
      ReactDOM.render(component, document.body.appendChild(document.createElement('div')));
    });
  }

This code is used to generate the print summary screen.
Screenshot 2024-07-24 at 12 25 14 PM

The issue is that currently if (props.options) is true but props.options is an empty object. So instead of just checking if the object exists we can also check if it contains any data by looking at the length of the keys array. This prevents the textual summary from being duplicated.

Before:
In the page elements we see an extra div being rendered at the bottom between the error-modal component and toast-wrapper div.
Screenshot 2024-07-24 at 12 28 23 PM

After:
This div is no longer being rendered in the page elements.
Screenshot 2024-07-24 at 12 29 22 PM

Also, the print summary screen is left unchanged by this pr.
Screenshot 2024-07-24 at 12 32 15 PM

@miq-bot
Copy link
Member

miq-bot commented Jul 24, 2024

Checked commits GilbertCherrie/manageiq-ui-classic@96a2db9~...fc28798 with ruby 3.1.5, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
0 files checked, 0 offenses detected
Everything looks fine. 🍪

@Fryguy Fryguy added the bug label Jul 31, 2024
@Fryguy
Copy link
Member

Fryguy commented Aug 15, 2024

Backported to radjabov via merge of master into radjabov branch

@GilbertCherrie GilbertCherrie deleted the fix-textual-summary-duplication branch October 18, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Service Summary display is duplicated

3 participants