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

feat: add sitewide banner to publisher #993

Merged
merged 1 commit into from
Dec 20, 2024
Merged

Conversation

AfaqShuaib09
Copy link
Contributor

@AfaqShuaib09 AfaqShuaib09 commented Dec 19, 2024

image

Copy link

codecov bot commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 94.11765% with 1 line in your changes missing coverage. Please review.

Project coverage is 67.90%. Comparing base (db74a23) to head (6b6ab33).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/components/SitewideBanner/index.jsx 93.75% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #993      +/-   ##
==========================================
+ Coverage   67.77%   67.90%   +0.13%     
==========================================
  Files         128      129       +1     
  Lines        3230     3247      +17     
  Branches      936      941       +5     
==========================================
+ Hits         2189     2205      +16     
- Misses        993      994       +1     
  Partials       48       48              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

message={process.env.SITEWIDE_BANNER_CONTENT || ''}
type="primary"
dismissible
cookieName="sitewidebannerDismissed"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: please make the cookie name unique enough, such as publisherSiteWideBannerViewed or publisherSiteWideBannerDismissed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

should we move it to edx-internal or keep it here?

Comment on lines 26 to 41
if (!isVisible) {
return null;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: instead of returning null here, we can use if-else format that has been used in other places in MFEs in opened. It makes the code consistent. This code looks a bit out of place.


const MainApp = () => (
<div>
<Header />
<SitewideBanner
message={process.env.SITEWIDE_BANNER_CONTENT || ''}
type="primary"
Copy link
Contributor

Choose a reason for hiding this comment

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

should it be primary or warning?

@AfaqShuaib09 AfaqShuaib09 merged commit 4a6684f into master Dec 20, 2024
6 checks passed
@AfaqShuaib09 AfaqShuaib09 deleted the afaq/prod-4263 branch December 20, 2024 09:13
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.

4 participants