-
Notifications
You must be signed in to change notification settings - Fork 30
AAA I can set an announcement with funnels and CTA button #1440
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
Conversation
Code Climate has analyzed commit 4c96067 and detected 7 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
Visit the preview URL for this PR (updated for commit 1223c52): https://co-reality-staging--preview-pr-1440-9i5xawm9.web.app (expires Fri, 01 Oct 2021 10:55:13 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass of the review. Overall looks good. Thanks for the refactors!
src/components/molecules/AnnouncementMessage/AnnouncementMessage.scss
Outdated
Show resolved
Hide resolved
src/components/molecules/AnnouncementMessage/AnnouncementMessage.scss
Outdated
Show resolved
Hide resolved
src/components/molecules/AnnouncementMessage/AnnouncementMessage.tsx
Outdated
Show resolved
Hide resolved
src/pages/Admin/Venue/AnnouncementOptions/AnnouoncementStatus/AnnouncementStatus.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments/questions/changes/etc. May need someone else like @sunny-viktoryia or similar to handle follow on reviews/etc, though I will try and keep an eye out for responses to my questions/etc.
Also, seems this PR has merge conflicts.
<> | ||
<h4 className="admin-page-title">You are editing venue: {venue.name}</h4> | ||
<BannerAdmin venueId={venueId} venue={venue} /> | ||
{isIframeVenue && <IframeAdmin venueId={venueId} venue={venue} />} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was IframeAdmin
removed from here? That doesn't seem right..?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems to be removed in the design as well https://www.figma.com/file/oX3Px4vYjjUkOZYSqcCgWI/Sparkle-Banner-Announcements?node-id=3%3A6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe sync with @sparkletown/product and find out the ‘why’ of that, if it was explicitly intended. I have a feeling it may be a case of the designs not reflecting the reality of the codebase rather than an explicit desire
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@0xdevalias as per discussion with Sofi this banner
feature is to be replaced by announcement one, so that should explain the removal of this code piece
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IframeAdmin is entirely different to banneradmin..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Alexey-Petrov, please, get <IframeAdmin />
back. It's about changing the URL for iframe venues.
@0xdevalias yes, can take it. 🙃 |
0eccd9d
to
771b70a
Compare
9937587
to
2824976
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another round of review. 🙃
src/pages/Admin/Venue/AnnouncementOptions/AnnouncementOptions.scss
Outdated
Show resolved
Hide resolved
)} | ||
|
||
<div className="AnnouncementMessage__content"> | ||
<RenderMarkdown text={banner?.content} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but you have useEffect
which handles not defined state.
useEffect(() => {
if (isDefined(banner?.content)) {
showAnnouncementMessage();
}
}, [banner, showAnnouncementMessage]);
and then you do
if (!isAnnouncementMessageVisible) return null;
…/banner-announcement
@sunny-viktoryia Updated general view according to latest comments in https://github.com/sparkletown/internal-sparkle-issues/issues/744 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like it's close to getting merged. Found a bug. Please, check the comments. 🙃
<Modal.Body> | ||
<div> | ||
{hasHeader && <Modal.Title>{header}</Modal.Title>} | ||
<div className="ConfirmationModal"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the class of the ConfirmationModal is moved? it should be set on the container element.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's still a container class for the confirmation content body
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, let's say we want to change the background of the confirmation modal. If we change it for the current ".ConfirmationModal" selector, it'll look this way, leaving black borders (see the screenshot). But if we assign this class name to the Modal component, we'll be able to target a child to change the background of the needed element.
} | ||
} | ||
|
||
.BannerAdminModal { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have this class name now?
src/components/molecules/AnnouncementMessage/AnnouncementMessage.tsx
Outdated
Show resolved
Hide resolved
@@ -14,42 +14,42 @@ import { LinkButton } from "components/atoms/LinkButton"; | |||
import "./AnnouncementMessage.scss"; | |||
|
|||
export interface AnnouncementMessageProps { | |||
banner?: Banner; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why was that changed? looks like we could get banner from everywhere without the need to get it here manually,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose it would be better to fetch banner info inside the banner component itself, so that it doesn't rely on the parent component
const venueId = useVenueId(); | ||
const { currentVenue: venue } = useConnectCurrentVenueNG(venueId); | ||
|
||
const { banner } = venue ?? {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use ALWAYS_EMPTY_OBJECT here instead of {}
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…/banner-announcement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/components/molecules/AnnouncementMessage/AnnouncementMessage.tsx
Outdated
Show resolved
Hide resolved
src/components/molecules/AnnouncementMessage/AnnouncementMessage.tsx
Outdated
Show resolved
Hide resolved
<Modal.Body> | ||
<div> | ||
{hasHeader && <Modal.Title>{header}</Modal.Title>} | ||
<div className="ConfirmationModal"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, let's say we want to change the background of the confirmation modal. If we change it for the current ".ConfirmationModal" selector, it'll look this way, leaving black borders (see the screenshot). But if we assign this class name to the Modal component, we'll be able to target a child to change the background of the needed element.
…/banner-announcement
dismissing as per #1440 (review)
…/banner-announcement
closes https://github.com/sparkletown/internal-sparkle-issues/issues/744