Skip to content

Commit d6c76ae

Browse files
committed
Remove option to hide the banner
1 parent d122789 commit d6c76ae

5 files changed

Lines changed: 37 additions & 60 deletions

File tree

.github/workflows/node.js.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: ['develop']
9+
pull_request:
10+
branches: ['develop']
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
node-version: [22.x]
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
cache: 'npm'
27+
- run: npm ci
28+
- run: npm run build --if-present
29+

src/app/shared/components/df-engagement-banner/df-engagement-banner.component.html

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@
77
<button class="cta-button" (click)="openCalendly()">
88
{{ 'engagementBanner.ctaButton' | transloco }}
99
</button>
10-
<button
11-
class="dismiss-button"
12-
(click)="dismissBanner()"
13-
[attr.aria-label]="'engagementBanner.dismiss' | transloco">
14-
×
15-
</button>
1610
</div>
1711
</div>
1812
<div class="banner-spacer"></div>

src/app/shared/components/df-engagement-banner/df-engagement-banner.component.scss

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -47,37 +47,6 @@
4747
outline-offset: 2px;
4848
}
4949
}
50-
51-
.dismiss-button {
52-
background: transparent;
53-
border: none;
54-
color: #2d2d2d;
55-
font-size: 24px;
56-
cursor: pointer;
57-
padding: 0;
58-
margin-left: 10px;
59-
opacity: 0.6;
60-
transition: opacity 0.2s ease;
61-
position: absolute;
62-
right: 20px;
63-
top: 50%;
64-
transform: translateY(-50%);
65-
width: 30px;
66-
height: 30px;
67-
display: flex;
68-
align-items: center;
69-
justify-content: center;
70-
71-
&:hover {
72-
opacity: 1;
73-
}
74-
75-
&:focus {
76-
outline: 2px solid #7c3aed;
77-
outline-offset: 2px;
78-
border-radius: 2px;
79-
}
80-
}
8150
}
8251

8352
.banner-spacer {
@@ -106,9 +75,5 @@
10675
padding: 8px 16px;
10776
font-size: 13px;
10877
}
109-
110-
.dismiss-button {
111-
right: 10px;
112-
}
11378
}
11479
}

src/app/shared/components/df-engagement-banner/df-engagement-banner.component.ts

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,17 @@ export class DfEngagementBannerComponent implements OnInit {
2020
constructor(private systemConfigService: DfSystemConfigDataService) {}
2121

2222
ngOnInit() {
23-
const isDismissed =
24-
localStorage.getItem('df-engagement-banner-dismissed') === 'true';
23+
this.systemConfigService.environment$
24+
.pipe(untilDestroyed(this))
25+
.subscribe(environment => {
26+
const license = environment.platform?.license?.toUpperCase();
27+
const isTrial = environment.platform?.isTrial ?? false;
2528

26-
if (!isDismissed) {
27-
this.systemConfigService.environment$
28-
.pipe(untilDestroyed(this))
29-
.subscribe(environment => {
30-
const license = environment.platform?.license?.toUpperCase();
31-
const isTrial = environment.platform?.isTrial ?? false;
32-
33-
this.showBanner = license === 'OPEN SOURCE' || isTrial;
34-
});
35-
}
29+
this.showBanner = license === 'OPEN SOURCE' || isTrial;
30+
});
3631
}
3732

3833
openCalendly() {
3934
window.open(this.calendlyUrl, '_blank');
4035
}
41-
42-
dismissBanner() {
43-
this.showBanner = false;
44-
localStorage.setItem('df-engagement-banner-dismissed', 'true');
45-
}
4636
}

src/assets/i18n/en.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,6 @@
445445
},
446446
"engagementBanner": {
447447
"message": "Testing DreamFactory? Let's show you what's possible. Book your free walkthrough",
448-
"ctaButton": "Schedule Now",
449-
"dismiss": "Dismiss banner"
448+
"ctaButton": "Schedule Now"
450449
}
451450
}

0 commit comments

Comments
 (0)