Skip to content

Commit 478aaad

Browse files
authored
Merge pull request #157 from ethdebug/whisper-draft
Specify draft status more clearly
2 parents 771538f + 74b1a7f commit 478aaad

19 files changed

+698
-29
lines changed

packages/web/docusaurus.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ const config: Config = {
128128
},
129129
{
130130
to: '/status',
131-
label: "⚠️ INCOMPLETE DRAFT ⚠️",
132-
className: "draft-warning",
131+
label: "Status: Draft",
132+
className: "status-indicator",
133133
position: "right"
134134
},
135135
{

packages/web/spec/data/overview.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
sidebar_position: 1
33
---
44

5+
import StatusBanner from "@site/src/components/StatusBanner";
6+
57
# Overview
68

79
:::tip[Summary]
@@ -15,6 +17,10 @@ a consistent way of representing these types.
1517

1618
:::
1719

20+
## Status
21+
22+
<StatusBanner schema="data" />
23+
1824
## Reading these schemas
1925

2026
The **ethdebug/format/data** namespace is not a schema itself, but rather

packages/web/spec/info/overview.mdx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
sidebar_position: 1
33
---
44

5+
import StatusBanner from "@site/src/components/StatusBanner";
6+
57
# Overview
68

79
:::tip[Summary]
@@ -37,13 +39,16 @@ This format defines the primary **ethdebug/format/info** schema.
3739
JSON values adhering to this schema contain debugging information about a
3840
single invocation of a compiler.
3941

42+
## Status
43+
44+
<StatusBanner schema="info" />
4045

4146
## Reading this schema
4247

43-
The **ethdebug/format/info** schema is a standalone schema and does not define
44-
a corresponding namespace.
48+
The **ethdebug/format/info** schema is a root schema that also defines the
49+
**ethdebug/format/info/resources** subschema.
4550

46-
This schema (like all schemas in this format) are specified as
51+
These schemas (like all schemas in this format) are specified as
4752
[JSON Schema](https://json-schema.org), draft 2020-12.
4853

4954
Please refer to one or more of the following resources in this section, or

packages/web/spec/materials/overview.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
sidebar_position: 1
33
---
44

5+
import StatusBanner from "@site/src/components/StatusBanner";
6+
57
# Overview
68

79
:::tip[Summary]
@@ -20,6 +22,10 @@ sources, e.g.
2022
This format defines a namespace of schemas for representing external resources
2123
relevant to smart contract debugging.
2224

25+
## Status
26+
27+
<StatusBanner schema="materials" />
28+
2329
## Reading these schemas
2430

2531
The **ethdebug/format/materials** namespace is not a schema itself, but rather

packages/web/spec/pointer/overview.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
sidebar_position: 1
33
---
44

5+
import StatusBanner from "@site/src/components/StatusBanner";
6+
57
# Overview
68

79
:::tip[Summary]
@@ -37,6 +39,10 @@ must be read from which location(s). Values in this schema may address
3739
a single continuous region of bytes or an aggregation of non-continuous related
3840
regions.
3941

42+
## Status
43+
44+
<StatusBanner schema="pointer" />
45+
4046
## Reading this schema
4147

4248
The **ethdebug/format/pointer** schema is a root schema that composes other

packages/web/spec/program/overview.mdx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,9 @@
22
sidebar_position: 1
33
---
44

5-
# Overview
6-
7-
:::warning
5+
import StatusBanner from "@site/src/components/StatusBanner";
86

9-
This schema and its subschemas remain largely incomplete. Please stay tuned as
10-
work continues here.
11-
12-
:::
7+
# Overview
138

149
:::tip[Summary]
1510

@@ -58,6 +53,10 @@ machine state at the time of the instruction back into high-level language
5853
concepts. This allows debuggers to provide a meaningful representation of
5954
program state at any point during execution.
6055

56+
## Status
57+
58+
<StatusBanner schema="program" />
59+
6160
## Reading this schema
6261

6362
The **ethdebug/format/program** schema is a root schema that composes other

packages/web/spec/type/overview.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import Tabs from "@theme/Tabs";
66
import TabItem from "@theme/TabItem";
77
import { describeSchema } from "@ethdebug/format";
88
import CodeBlock from "@theme/CodeBlock";
9+
import StatusBanner from "@site/src/components/StatusBanner";
910

1011
# Overview
1112

@@ -54,6 +55,10 @@ JSON values that adhere to this schema may (for example) represent a particular
5455
fields, a particular `mapping` type from a certain key type to a certain value
5556
type, and so on.
5657

58+
## Status
59+
60+
<StatusBanner schema="type" />
61+
5762
## Reading this schema
5863

5964
The **ethdebug/format/type** schema is a root schema that conditionally defers
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
.badge {
2+
display: inline-flex;
3+
align-items: center;
4+
font-weight: 500;
5+
border-radius: 4px;
6+
color: white;
7+
white-space: nowrap;
8+
}
9+
10+
.link {
11+
text-decoration: none;
12+
}
13+
14+
.link:hover .badge {
15+
opacity: 0.9;
16+
}
17+
18+
/* Sizes */
19+
.small {
20+
padding: 2px 6px;
21+
font-size: 0.7rem;
22+
}
23+
24+
.medium {
25+
padding: 4px 10px;
26+
font-size: 0.8rem;
27+
}
28+
29+
.large {
30+
padding: 6px 14px;
31+
font-size: 0.9rem;
32+
}
33+
34+
/* Status colors */
35+
.in-design {
36+
background-color: #6366f1;
37+
}
38+
39+
.implementable {
40+
background-color: #d97706;
41+
}
42+
43+
.reference-available {
44+
background-color: #059669;
45+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import React from "react";
2+
import Link from "@docusaurus/Link";
3+
import {
4+
statusLevels,
5+
type StatusLevel,
6+
} from "@site/src/status/status-config";
7+
import styles from "./StatusBadge.module.css";
8+
9+
export interface StatusBadgeProps {
10+
status: StatusLevel;
11+
size?: "small" | "medium" | "large";
12+
linkToStatus?: boolean;
13+
}
14+
15+
export default function StatusBadge({
16+
status,
17+
size = "medium",
18+
linkToStatus = true,
19+
}: StatusBadgeProps): JSX.Element {
20+
const info = statusLevels[status];
21+
22+
const badge = (
23+
<span
24+
className={`${styles.badge} ${styles[size]} ${styles[status]}`}
25+
title={info.description}
26+
>
27+
{info.label}
28+
</span>
29+
);
30+
31+
if (linkToStatus) {
32+
return (
33+
<Link to="/status" className={styles.link}>
34+
{badge}
35+
</Link>
36+
);
37+
}
38+
39+
return badge;
40+
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
.banner {
2+
padding: 1rem 1.25rem;
3+
border-radius: 8px;
4+
margin-bottom: 1.5rem;
5+
border-left: 4px solid;
6+
}
7+
8+
.banner.in-design {
9+
background-color: rgba(99, 102, 241, 0.1);
10+
border-left-color: #6366f1;
11+
}
12+
13+
.banner.implementable {
14+
background-color: rgba(217, 119, 6, 0.1);
15+
border-left-color: #d97706;
16+
}
17+
18+
.banner.reference-available {
19+
background-color: rgba(5, 150, 105, 0.1);
20+
border-left-color: #059669;
21+
}
22+
23+
.header {
24+
margin-bottom: 0.75rem;
25+
}
26+
27+
.summary {
28+
margin: 0 0 0.75rem 0;
29+
font-size: 0.95rem;
30+
line-height: 1.5;
31+
}
32+
33+
.caveats {
34+
margin: 0.75rem 0;
35+
font-size: 0.9rem;
36+
}
37+
38+
.caveats ul {
39+
margin: 0.25rem 0 0 1.25rem;
40+
padding: 0;
41+
}
42+
43+
.caveats li {
44+
margin: 0.25rem 0;
45+
}
46+
47+
.note {
48+
margin: 0.75rem 0;
49+
font-size: 0.85rem;
50+
font-style: italic;
51+
opacity: 0.85;
52+
}
53+
54+
.reference {
55+
margin: 0.5rem 0 0 0;
56+
font-size: 0.9rem;
57+
}
58+
59+
.learnMore {
60+
margin: 0.5rem 0 0 0;
61+
font-size: 0.85rem;
62+
}
63+
64+
/* Dark mode adjustments */
65+
[data-theme="dark"] .banner.in-design {
66+
background-color: rgba(99, 102, 241, 0.15);
67+
}
68+
69+
[data-theme="dark"] .banner.implementable {
70+
background-color: rgba(217, 119, 6, 0.15);
71+
}
72+
73+
[data-theme="dark"] .banner.reference-available {
74+
background-color: rgba(5, 150, 105, 0.15);
75+
}

0 commit comments

Comments
 (0)