Skip to content

Commit f458c2b

Browse files
committed
frontend: remove leaderboard component
1 parent ad84b13 commit f458c2b

File tree

79 files changed

+14
-3078
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+14
-3078
lines changed

.github/actions/frontend-build/action.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,6 @@ runs:
6767
working-directory: frontend
6868
shell: bash
6969

70-
- name: Test make build-leaderboard
71-
if: inputs.test-build-commands == 'true'
72-
run: |
73-
rm -rf dist
74-
make build-leaderboard
75-
[ -d "dist/frontend" ] || { echo "Error: make build-leaderboard failed"; exit 1; }
76-
working-directory: frontend
77-
shell: bash
78-
7970
- name: Test make build-local
8071
if: inputs.test-build-commands == 'true'
8172
run: |

.github/scripts/docker/test-frontend-docker.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ set -euo pipefail
1717
if [ $# -lt 2 ]; then
1818
echo "Usage: $0 <image> <environment> [port]"
1919
echo ""
20-
echo "Supported environments: local, webnode, production, fuzzing, leaderboard, staging"
20+
echo "Supported environments: local, webnode, production, fuzzing, staging"
2121
echo ""
2222
echo "Examples:"
2323
echo " $0 o1labs/mina-rust-frontend:latest production"
@@ -31,7 +31,7 @@ PORT="${3:-8080}"
3131
CONTAINER_NAME="test-frontend-${ENVIRONMENT}-$$"
3232

3333
# Supported environments
34-
SUPPORTED_ENVS="local webnode production fuzzing leaderboard staging"
34+
SUPPORTED_ENVS="local webnode production fuzzing staging"
3535
if [[ ! " $SUPPORTED_ENVS " =~ \ $ENVIRONMENT\ ]]; then
3636
echo "❌ Unsupported environment: $ENVIRONMENT"
3737
echo "Supported environments: $SUPPORTED_ENVS"

.github/workflows/test-docs-scripts-frontend.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,6 @@ jobs:
8585
fi
8686
bash website/docs/developers/scripts/frontend/format-code.sh
8787
88-
- name: Test build leaderboard script
89-
run: |
90-
# Source nvm if available (Linux)
91-
if [ -n "$NVM_DIR" ] && [ -s "$NVM_DIR/nvm.sh" ]; then
92-
\. "$NVM_DIR/nvm.sh"
93-
fi
94-
bash website/docs/developers/scripts/frontend/build-leaderboard.sh
95-
9688
- name: Test build webnode script
9789
run: |
9890
# Source nvm if available (Linux)

frontend/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# Generated by running: ./generate-docker-env.sh
2626
#
2727
# REQUIRED ENVIRONMENT VARIABLES:
28-
# MINA_FRONTEND_ENVIRONMENT - Frontend configuration (local|webnode|production|fuzzing|leaderboard|staging)
28+
# MINA_FRONTEND_ENVIRONMENT - Frontend configuration (local|webnode|production|fuzzing|staging)
2929
#
3030
# USAGE:
3131
# # Generate .env.docker with current git information

frontend/Makefile

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -42,24 +42,12 @@ build-webnode: ## Build the frontend with webnode configuration
4242
cp dist/frontend/browser/assets/environments/webnode.js \
4343
dist/frontend/browser/assets/environments/env.js
4444

45-
.PHONY: build-leaderboard
46-
build-leaderboard: build-production ## Build the frontend with leaderboard configuration
47-
cp dist/frontend/browser/assets/environments/leaderboard.js \
48-
dist/frontend/browser/assets/environments/env.js
49-
5045
.PHONY: build-staging
5146
build-staging: ## Build the frontend with staging configuration
5247
npx ng build --configuration production
5348
cp dist/frontend/browser/assets/environments/staging.js \
5449
dist/frontend/browser/assets/environments/env.js
5550

56-
.PHONY: build-leaderboard-sentry
57-
build-leaderboard-sentry: ## Build the frontend with leaderboard configuration and Sentry sourcemaps
58-
npx ng build --configuration production
59-
cp dist/frontend/browser/assets/environments/leaderboard.js \
60-
dist/frontend/browser/assets/environments/env.js
61-
$(MAKE) sentry-sourcemaps
62-
6351
.PHONY: check-prettify
6452
check-prettify: ## Check if files are formatted with Prettier
6553
npx prettier --check 'src/**/*.{ts,js,html,scss,css,json}'
@@ -77,14 +65,6 @@ copy-env: ## Copy webnode.js to env.js
7765
deploy: prebuild build-production-sentry copy-env ## Deploy the application
7866
firebase deploy
7967

80-
.PHONY: deploy-leaderboard
81-
deploy-leaderboard: prebuild build-leaderboard ## Deploy the leaderboard application
82-
firebase deploy
83-
84-
.PHONY: deploy-leaderboard-sentry
85-
deploy-leaderboard-sentry: prebuild build-leaderboard-sentry ## Deploy the leaderboard application with Sentry sourcemaps
86-
firebase deploy
87-
8868
.PHONY: install-deps
8969
install-deps: ## Install npm dependencies (alias)
9070
npm install

frontend/docker/startup.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,13 @@ build_frontend() {
3232
# Uses Angular webnode-local configuration and webnode.js runtime
3333
make build-webnode
3434
;;
35-
"leaderboard")
36-
# Uses Angular production configuration and leaderboard.js runtime
37-
make build-leaderboard
38-
;;
3935
"staging")
4036
# Uses Angular production configuration with staging.js runtime
4137
make build-staging
4238
;;
4339
*)
4440
echo "Error: Unknown environment '$environment'"
45-
echo "Available environments: local, fuzzing, production, webnode, leaderboard, staging"
41+
echo "Available environments: local, fuzzing, production, webnode, staging"
4642
exit 1
4743
;;
4844
esac
@@ -58,7 +54,7 @@ build_frontend() {
5854
# Validate that MINA_FRONTEND_ENVIRONMENT is set
5955
if [ -z "$MINA_FRONTEND_ENVIRONMENT" ]; then
6056
echo "Error: MINA_FRONTEND_ENVIRONMENT environment variable is required."
61-
echo "Available environments: local, fuzzing, production, webnode, leaderboard, staging"
57+
echo "Available environments: local, fuzzing, production, webnode, staging"
6258
echo "Example: docker run -e MINA_FRONTEND_ENVIRONMENT=webnode mina-frontend"
6359
exit 1
6460
fi

frontend/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"check-prettify": "make check-prettify",
1313
"copy-env": "make copy-env",
1414
"deploy": "make deploy",
15-
"deploy:leaderboard": "make deploy-leaderboard",
1615
"install:deps": "make install-deps",
1716
"prebuild": "make prebuild",
1817
"prettify": "make prettify",

frontend/public/environments/leaderboard.js

Lines changed: 0 additions & 40 deletions
This file was deleted.

frontend/src/app/app.component.html

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
@if (showLandingPage$ | async) {
2-
@if (showLeaderboard) {
3-
<router-outlet></router-outlet>
4-
<!-- <mina-leaderboard-landing-page></mina-leaderboard-landing-page>-->
5-
} @else {
6-
<mina-web-node-landing-page
7-
(goToNode)="goToWebNode()"
8-
(stopRequests)="clearNodeUpdateSubscription()"
9-
></mina-web-node-landing-page>
10-
}
2+
<mina-web-node-landing-page
3+
(goToNode)="goToWebNode()"
4+
(stopRequests)="clearNodeUpdateSubscription()"
5+
></mina-web-node-landing-page>
116
} @else if (showLoadingWebNodePage$ | async) {
127
<router-outlet></router-outlet>
13-
} @else if (showLeaderboardPage$ | async) {
14-
<router-outlet></router-outlet>
158
} @else if (loaded) {
169
<mat-sidenav-container
1710
[hasBackdrop]="false"
@@ -43,7 +36,6 @@
4336
[class.no-toolbar]="hideToolbar"
4437
[class.no-submenus]="subMenusLength < 2"
4538
[class.mobile]="menu.isMobile"
46-
[class.uptime]="showLeaderboard"
4739
>
4840
<router-outlet></router-outlet>
4941
</div>

frontend/src/app/app.component.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import { ToolbarComponent } from '@app/layout/toolbar/toolbar.component';
2828
import { SubmenuTabsComponent } from '@app/layout/submenu-tabs/submenu-tabs.component';
2929
import { WebNodeLandingPageComponent } from '@app/layout/web-node-landing-page/web-node-landing-page.component';
3030
import { MenuTabsComponent } from '@app/layout/menu-tabs/menu-tabs.component';
31-
import { LeaderboardModule } from '@leaderboard/leaderboard.module';
3231

3332
declare var AOS: any;
3433

@@ -53,7 +52,6 @@ declare var AOS: any;
5352
MenuTabsComponent,
5453
// Modules
5554
OpenminaEagerSharedModule,
56-
LeaderboardModule,
5755
],
5856
})
5957
export class AppComponent extends StoreDispatcher implements OnInit {
@@ -74,15 +72,8 @@ export class AppComponent extends StoreDispatcher implements OnInit {
7472
route.url.startsWith(`/${Routes.LOADING_WEB_NODE}`),
7573
),
7674
);
77-
readonly showLeaderboardPage$: Observable<boolean> = this.select$(
78-
getMergedRoute,
79-
).pipe(
80-
filter(Boolean),
81-
map((route: MergedRoute) => route.url.startsWith(`/${Routes.LEADERBOARD}`)),
82-
);
8375
subMenusLength: number = 0;
8476
hideToolbar: boolean = CONFIG.hideToolbar;
85-
showLeaderboard: boolean = CONFIG.showLeaderboard;
8677
loaded: boolean;
8778
isDesktop: boolean = isDesktop();
8879

@@ -121,7 +112,7 @@ export class AppComponent extends StoreDispatcher implements OnInit {
121112
take(1),
122113
);
123114

124-
if (CONFIG.showLeaderboard && CONFIG.showWebNodeLandingPage) {
115+
if (CONFIG.showWebNodeLandingPage) {
125116
/* frontend with some landing page */
126117
this.select(
127118
getMergedRoute,
@@ -133,7 +124,7 @@ export class AppComponent extends StoreDispatcher implements OnInit {
133124
),
134125
take(1),
135126
);
136-
} else if (!CONFIG.showLeaderboard && !CONFIG.showWebNodeLandingPage) {
127+
} else {
137128
/* normal frontend (no landing pages) */
138129
this.initAppFunctionalities();
139130
}

0 commit comments

Comments
 (0)