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

fix: feature flag 'feeds' page #492

Merged
merged 4 commits into from
Jun 18, 2024
Merged

Conversation

Alessandro100
Copy link
Contributor

@Alessandro100 Alessandro100 commented Jun 17, 2024

closes #477

Summary:

Adds feature flag to 'feeds' page to hide it in PROD until it's ready

Expected behavior:

If the feature flag is disabled, 'feeds' should not appear in the nav bar, nor should it exist as a route.
Screenshot 2024-06-17 at 14 28 05

Testing tips:

Go into firebase and modify the feature flag values

Go into web-app/src/app/constants/Navigation.ts and manually modify the feature flag values

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the unit tests with ./scripts/api-tests.sh to make sure you didn't break anything
  • [] Add or update any needed documentation to the repo
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)

@Alessandro100 Alessandro100 self-assigned this Jun 17, 2024
Copy link

Preview Firebase Hosting URL: https://mobility-feeds-dev--pr-492-k5otr9pu.web.app

Copy link
Contributor

@cka-y cka-y left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

);
expect(feedsNavigation).toBeUndefined();
});
});
Copy link
Contributor

Choose a reason for hiding this comment

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

First UI unit tests 💯

Comment on lines 9 to 13
export enum NavigationItemVariant {
Text = 'text',
Outlined = 'outlined',
Contained = 'contained',
}
Copy link
Contributor

Choose a reason for hiding this comment

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

[suggestion] Since we only use Text -- we can get rid of this enum completely and the variant variable is NavigationItem instances.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would you be able to clarify? Do you mean removing the variant variable all together? To change in Header.tsx variant={item.variant} to variant={'text'}? Although right now we only use Text keep the flexibility in the future would be good?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes that's my suggestion following the YAGNI principle

Always implement things when you actually need them, never when you just foresee that you need them.

This is just a suggestion. Feel free to disregard if you're in disagreement 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm convinced

@davidgamez davidgamez mentioned this pull request Jun 18, 2024
5 tasks
@Alessandro100 Alessandro100 merged commit 6bcf080 into main Jun 18, 2024
3 checks passed
@Alessandro100 Alessandro100 deleted the fix/477-feeds-feature-flag branch June 18, 2024 17:09
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.

Feature flag should be disabled on prod for feeds page
2 participants