Skip to content

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

Merged
merged 60 commits into from
Sep 24, 2021

Conversation

oleksii-front
Copy link
Contributor

@oleksii-front oleksii-front commented May 25, 2021

@oleksii-front oleksii-front requested a review from a team as a code owner May 25, 2021 06:57
@oleksii-front oleksii-front self-assigned this May 25, 2021
@oleksii-front oleksii-front temporarily deployed to feature-preview May 25, 2021 06:57 Inactive
@oleksii-front oleksii-front added the 🚧 WIP Work In Progress (consider making the PR a draft instead of/as well as using this label) label May 25, 2021
@github-actions github-actions bot added the 💎 styles For (S)CSS style related issues/changes/improvements/etc. label May 25, 2021
@codeclimate
Copy link

codeclimate bot commented May 25, 2021

Code Climate has analyzed commit 4c96067 and detected 7 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 2
Duplication 5

View more on Code Climate.

@github-actions
Copy link

github-actions bot commented May 25, 2021

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 🌎

@oleksii-front oleksii-front removed the 🚧 WIP Work In Progress (consider making the PR a draft instead of/as well as using this label) label May 25, 2021
@oleksii-front oleksii-front temporarily deployed to feature-preview May 28, 2021 15:38 Inactive
@oleksii-front oleksii-front temporarily deployed to feature-preview May 31, 2021 10:37 Inactive
@oleksii-front oleksii-front temporarily deployed to feature-preview May 31, 2021 11:10 Inactive
@oleksii-front oleksii-front temporarily deployed to feature-preview June 3, 2021 08:19 Inactive
Copy link
Contributor

@mike-lvov mike-lvov left a 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!

@oleksii-front oleksii-front requested a review from mike-lvov June 13, 2021 10:30
Copy link
Contributor

@0xdevalias 0xdevalias left a 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.

image

<>
<h4 className="admin-page-title">You are editing venue: {venue.name}</h4>
<BannerAdmin venueId={venueId} venue={venue} />
{isIframeVenue && <IframeAdmin venueId={venueId} venue={venue} />}
Copy link
Contributor

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..?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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..

Copy link
Contributor

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.
image

@0xdevalias 0xdevalias added the 💪 enhancement Enhancements/improvements to existing functionality label Jun 25, 2021
@sunny-viktoryia sunny-viktoryia self-requested a review June 25, 2021 10:15
@sunny-viktoryia
Copy link
Contributor

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.

@0xdevalias yes, can take it. 🙃
@oleksii-front, please ping me when I can re-review it.

@oleksii-front oleksii-front temporarily deployed to feature-preview June 25, 2021 15:23 Inactive
@oleksii-front oleksii-front requested a review from 0xdevalias June 28, 2021 14:55
@alexxpetrov alexxpetrov force-pushed the feature/banner-announcement branch from 0eccd9d to 771b70a Compare July 1, 2021 10:45
@alexxpetrov alexxpetrov temporarily deployed to feature-preview July 1, 2021 10:46 Inactive
@alexxpetrov alexxpetrov temporarily deployed to feature-preview July 2, 2021 11:54 Inactive
@alexxpetrov alexxpetrov temporarily deployed to feature-preview July 2, 2021 12:52 Inactive
@alexxpetrov alexxpetrov force-pushed the feature/banner-announcement branch from 9937587 to 2824976 Compare July 2, 2021 12:53
Copy link
Contributor

@sunny-viktoryia sunny-viktoryia left a 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. 🙃

)}

<div className="AnnouncementMessage__content">
<RenderMarkdown text={banner?.content} />
Copy link
Contributor

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;

@alexxpetrov alexxpetrov temporarily deployed to feature-preview September 23, 2021 12:14 Inactive
@alexxpetrov alexxpetrov temporarily deployed to feature-preview September 23, 2021 12:25 Inactive
@alexxpetrov alexxpetrov temporarily deployed to feature-preview September 23, 2021 12:27 Inactive
@alexxpetrov
Copy link
Contributor

@sunny-viktoryia Updated general view according to latest comments in https://github.com/sparkletown/internal-sparkle-issues/issues/744
so there are some new changes including fixes according to your comments

@alexxpetrov alexxpetrov temporarily deployed to feature-preview September 23, 2021 13:04 Inactive
Copy link
Contributor

@sunny-viktoryia sunny-viktoryia left a 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">
Copy link
Contributor

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.

Copy link
Contributor

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

Copy link
Contributor

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.

image

}
}

.BannerAdminModal {
Copy link
Contributor

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?

@@ -14,42 +14,42 @@ import { LinkButton } from "components/atoms/LinkButton";
import "./AnnouncementMessage.scss";

export interface AnnouncementMessageProps {
banner?: Banner;
Copy link
Contributor

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,

Copy link
Contributor

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 ?? {};
Copy link
Contributor

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 {}.

Copy link
Contributor

Choose a reason for hiding this comment

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

doesn't work in this case for some reason
image

@alexxpetrov alexxpetrov temporarily deployed to feature-preview September 24, 2021 10:47 Inactive
@alexxpetrov alexxpetrov temporarily deployed to feature-preview September 24, 2021 10:50 Inactive
Copy link
Contributor

@sunny-viktoryia sunny-viktoryia left a comment

Choose a reason for hiding this comment

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

Approving. Thanks for your efforts! ❤️ It was a loooooong way!
Although would be perfect to address the comments to the review before the merge as well.

and a question: should the announcement hide when I scroll the venue?
recording (2)

<Modal.Body>
<div>
{hasHeader && <Modal.Title>{header}</Modal.Title>}
<div className="ConfirmationModal">
Copy link
Contributor

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.

image

@alexxpetrov alexxpetrov enabled auto-merge (squash) September 24, 2021 15:59
@alexxpetrov alexxpetrov merged commit 0493abd into staging Sep 24, 2021
@alexxpetrov alexxpetrov deleted the feature/banner-announcement branch September 24, 2021 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 enhancement Enhancements/improvements to existing functionality 💎 styles For (S)CSS style related issues/changes/improvements/etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants