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

🐛 application can only have one review #1693

Merged
merged 2 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ export const ApplicationDetailDrawer: React.FC<
</Tab>
<Tab
eventKey={TabKey.Reviews}
title={<TabTitleText>{t("terms.reviews")}</TabTitleText>}
title={<TabTitleText>{t("terms.review")}</TabTitleText>}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be reviews.
An application can have more than one review inherited from multiple archetypes
app_review_mta-7 0 0-50

Copy link
Member Author

Choose a reason for hiding this comment

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

Then what exactly was meant by the comment:

Scott Dickerson please see attached app_review_mta-7.0.0-50.png, I think the best would be to title the tab in application side drawer "Review" as suggested in the bug summary.
Thanks

Based on this comment. The bug is fixed and should have been closed.

Copy link
Member Author

Choose a reason for hiding this comment

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

I keep reading and re-reading trying to understand what I'm missing. My apologies. These look like two comments in direct opposition to each other.

One says, I think the best would be to title the tab in the application side drawer "Review"... and the comment made on the line that changes it to "Review" is Should be **reviews**.

Copy link
Member

Choose a reason for hiding this comment

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

@JustinXHale

Question for you here:
When an application has a review at the app level, we only show the app review in the drawer as expected / discussed.
Screenshot 2024-02-21 at 3 39 32 PM

Then when we discard the review for the app, we show the inherited archetype reviews.

Screenshot 2024-02-21 at 3 39 39 PM Screenshot 2024-02-21 at 3 39 50 PM

Want to figure out a better way to represent this in the UI. Any ideas here? There is some desire to change the review tab to read reviews / review depending on which scenario we are in. Wondering your take on this. Thanks!

Copy link
Collaborator

@mguetta1 mguetta1 Feb 21, 2024

Choose a reason for hiding this comment

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

@djzager You are so right! I confused myself...
I forgot that I asked to change the tab title to "Review" and the initial purpose of the bug

In bottom line, application can have one or more reviews, so Review/Reviews are both acceptable as the tab title :)
The original bug was to make the term "Review" in both application and archetype drawer side, so LGTM

Sorry about that.

Copy link
Member

Choose a reason for hiding this comment

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

@ibolton336 I think Review or Reviews is appropriate. I learn more to 'Reviews' since applications and archetypes can have more than one review. But many applications might only have one 'Review' so review sits just fine as well, and if its more than one its no big deal.

If the majority are okay with 'Review', which that seems to be the case, I'm good with 'Review' as well.

Copy link
Member

Choose a reason for hiding this comment

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

👍 Thanks @JustinXHale

>
<ReviewFields application={application} />
</Tab>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ import {
DescriptionListGroup,
DescriptionListTerm,
DescriptionListDescription,
Title,
TextContent,
} from "@patternfly/react-core";
import { Application, Archetype, Review } from "@app/api/models";
import spacing from "@patternfly/react-styles/css/utilities/Spacing/spacing";
import { useFetchReviewById, useFetchReviews } from "@app/queries/reviews";
import { useFetchArchetypes } from "@app/queries/archetypes";
import { EmptyTextMessage } from "@app/components/EmptyTextMessage";
Expand Down Expand Up @@ -75,11 +72,6 @@ export const ReviewFields: React.FC<{

return (
<>
<TextContent className={spacing.mtLg}>
<Title headingLevel="h3" size="md">
{t("terms.review")}
</Title>
</TextContent>
<DescriptionListGroup>
<DescriptionListTerm>{t("terms.proposedAction")}</DescriptionListTerm>
<DescriptionListDescription cy-data="proposed-action">
Expand Down
Loading