Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -867,18 +867,33 @@ jobs:
working-directory: mithril-explorer
run: make test

- name: Build Explorer
- name: Build Explorer (stable)
working-directory: mithril-explorer
run: make build

- name: Publish Explorer build
- name: Publish Explorer build (stable)
uses: actions/upload-artifact@v4
with:
name: explorer-build
if-no-files-found: error
path: |
mithril-explorer/out/*

- name: Build Explorer (unstable)
working-directory: mithril-explorer
env:
BASE_PATH: "/explorer/unstable"
UNSTABLE: "1"
run: make build

- name: Publish Explorer build (unstable)
uses: actions/upload-artifact@v4
with:
name: explorer-build-unstable
if-no-files-found: error
path: |
mithril-explorer/out/*

build-open-api-ui:
runs-on: ubuntu-22.04
steps:
Expand Down Expand Up @@ -923,12 +938,18 @@ jobs:
name: docusaurus-build
path: ./github-pages/doc

- name: Download Explorer build
- name: Download Explorer build (stable)
uses: actions/download-artifact@v4
with:
name: explorer-build
path: ./github-pages/explorer

- name: Download Explorer build (unstable)
uses: actions/download-artifact@v4
with:
name: explorer-build-unstable
path: ./github-pages/explorer/unstable

- name: Download OpenAPI UI build
uses: actions/download-artifact@v4
with:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ As a minor extension, we have adopted a slightly different versioning convention

## Mithril Distribution [XXXX] - UNRELEASED

- Build and publish both a `stable` version (for release networks) and an `unstable` version (for testing networks) of the explorer.

- Crates versions:

| Crate | Version |
Expand Down
14 changes: 14 additions & 0 deletions mithril-explorer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,20 @@ make dev

Open [http://localhost:3000](http://localhost:3000/explorer) with your browser to see the result.

### Enabling unstable features

Some features are still in development and are not enabled by default. To enable them, set the `UNSTABLE` environment variable to `1` when running the development server:

```bash
UNSTABLE=1 make dev
```

Or when building the production version:

```bash
UNSTABLE=1 make build
```

## Adding or updating an icon of the 'Mithril' font

In the `./icons` folder add or modify a svg.
Expand Down
11 changes: 9 additions & 2 deletions mithril-explorer/next.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
/** @type {import('next').NextConfig} */
const webpack = require("webpack");

/** @type {import("next").NextConfig} */
const nextConfig = {
output: "export",
basePath: "/explorer",
basePath: process.env.BASE_PATH ?? "/explorer",
reactStrictMode: true,
images: {
unoptimized: true,
},
webpack: (config) => {
config.experiments = { layers: true, asyncWebAssembly: true };
config.plugins.push(
new webpack.DefinePlugin({
"process.env.UNSTABLE": process.env.UNSTABLE === "1",
}),
);
return config;
},
};
Expand Down
4 changes: 2 additions & 2 deletions mithril-explorer/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mithril-explorer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mithril-explorer",
"version": "0.7.22",
"version": "0.7.23",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down
9 changes: 9 additions & 0 deletions mithril-explorer/src/app/layout.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Image from "next/image";
import Link from "next/link";
import React, { Suspense } from "react";
import { Badge } from "react-bootstrap";
import { Providers } from "@/store/provider";

// These styles apply to every route in the application
Expand Down Expand Up @@ -31,6 +32,14 @@ export default function RootLayout({ children }) {
<Image src="/explorer/logo.png" alt="Mithril Logo" width={55} height={55} />{" "}
Mithril Explorer
</Link>
{process.env.UNSTABLE && (
<>
{" "}
<Badge bg="danger" className="fs-6 align-text-top">
Unstable
</Badge>
</>
)}
</h1>
{children}
</main>
Expand Down