Skip to content

Commit

Permalink
Profile Page Feature Flag (#743)
Browse files Browse the repository at this point in the history
* added profile feature flag

* modified logic for showing open plan button
  • Loading branch information
zachary-kent authored Oct 27, 2022
1 parent fc8a6c5 commit b2f4a63
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
7 changes: 5 additions & 2 deletions src/components/NavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<img class="navbar-icon hairline" src="@/assets/images/navbar/hairline.svg" />
</div>
<div
v-if="toolsEnabled"
v-if="showOpenPlan"
class="navbar-buttonWrapper desktop"
@click="openPlan"
data-cyId="openPlan"
Expand Down Expand Up @@ -60,7 +60,7 @@
</span>
</button>
<button
v-if="toolsEnabled"
v-if="showOpenPlan"
class="nav-mobile-button"
data-cyId="navbar-openPlan"
@click="openPlan"
Expand Down Expand Up @@ -120,6 +120,9 @@ export default defineComponent({
toolsEnabled(): boolean {
return featureFlagCheckers.isToolsEnabled();
},
showOpenPlan(): boolean {
return this.toolsEnabled || featureFlagCheckers.isProfileEnabled();
},
},
methods: {
logout() {
Expand Down
4 changes: 2 additions & 2 deletions src/containers/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@ export default defineComponent({
},
openProfile() {
if (featureFlagCheckers.isToolsEnabled()) {
this.showToolsPage = false;
if (featureFlagCheckers.isProfileEnabled()) {
this.isProfileOpen = true;
this.showToolsPage = false;
} else {
this.editProfile();
}
Expand Down
6 changes: 4 additions & 2 deletions src/feature-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@ type FeatureFlagName =
| 'RequirementConflicts'
| 'RequirementDebugger'
| 'ToggleRequirementsBarBtn'
| 'Tools';
| 'Tools'
| 'Profile';
/* | 'AddYourFeatureFlagNameHere' */
const featureFlagCheckers: FeatureFlagCheckers = registerFeatureFlagChecker(
'APIBFulfillment',
'Case',
'RequirementConflicts',
'RequirementDebugger',
'ToggleRequirementsBarBtn',
'Tools'
'Tools',
'Profile'
/* 'AddYourFeatureFlagNameHere' */
);
export default featureFlagCheckers;
Expand Down

0 comments on commit b2f4a63

Please sign in to comment.