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

Dev-Only Announcement Banners do not work on deployed site #588

Open
joebochill opened this issue Nov 1, 2022 · 2 comments
Open

Dev-Only Announcement Banners do not work on deployed site #588

joebochill opened this issue Nov 1, 2022 · 2 comments
Labels
brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering bug Something not working as expected good first issue A good issue for first-time contributors

Comments

@joebochill
Copy link
Collaborator

Describe the bug

Announcements that are specified as devOnly do not appear on the deployed version of the dev site.

What is the expected behavior?

These banners should be visible

What are the steps to reproduce?

  1. Configure an announcement banner in the blui-database repository that is devOnly
  2. Open the dev version of the doc site on github pages
  3. Observe that the banner is not visible on the homepage

Screenshots / Screen recording

image

Code snippet / Link to minimum reproduction example

https://brightlayer-ui-dev.github.io/

image

environment === 'production' will always return true.

Your environment information

Suggested fix

This issue for this is because we are using the process.env.NODE_ENV to determine whether we are dev or master, which is incorrect. When the site is deployed to github pages, it's a production build (regardless of whether we deploy to master or dev). This needs to be updated to use a proper environment variable in CircleCI to determine the branch we are on.

Anything else to add?

There is also a gap that appears on the MASTER version of the deployed site when there is a devOnly version

@joebochill joebochill added bug Something not working as expected needs-review Issues that we would like to revisit/review labels Nov 1, 2022
@huayunh
Copy link
Contributor

huayunh commented Nov 3, 2022

Whoever is fixing this bug, make sure that you will also fix this dirty hack here: https://github.com/brightlayer-ui/doc-it/blob/dev/src/__configuration__/resources/ComponentCatalogLinks.ts#L17

@daileytj
Copy link
Contributor

Whoever is fixing this bug, make sure that you will also fix this dirty hack here: https://github.com/brightlayer-ui/doc-it/blob/dev/src/__configuration__/resources/ComponentCatalogLinks.ts#L17

You can use dotenv package to manage this

@jeffvg jeffvg removed the needs-review Issues that we would like to revisit/review label Dec 8, 2022
@joebochill joebochill added the brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering label Jan 5, 2023
@joebochill joebochill added the good first issue A good issue for first-time contributors label May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering bug Something not working as expected good first issue A good issue for first-time contributors
Development

No branches or pull requests

4 participants