From 5380fc3e0e6a825ebdad70ffebb75867f0ec9ff0 Mon Sep 17 00:00:00 2001 From: Marc Espin Date: Thu, 19 Dec 2024 10:17:06 +0100 Subject: [PATCH 1/4] refactor(wallet-dashboard): clean up settings (#4540) * refactor(wallet-dashboard): Clean up settings * fmt --------- Co-authored-by: evavirseda --- .../Dialogs/settings/SettingsDialog.tsx | 14 +++++----- .../settings/views/NetworkSelectorView.tsx | 26 +++++++++---------- .../settings/views/SettingsListView.tsx | 7 +++-- 3 files changed, 21 insertions(+), 26 deletions(-) diff --git a/apps/wallet-dashboard/components/Dialogs/settings/SettingsDialog.tsx b/apps/wallet-dashboard/components/Dialogs/settings/SettingsDialog.tsx index 2c87b522af2..447c3e3a4e9 100644 --- a/apps/wallet-dashboard/components/Dialogs/settings/SettingsDialog.tsx +++ b/apps/wallet-dashboard/components/Dialogs/settings/SettingsDialog.tsx @@ -25,14 +25,12 @@ export function SettingsDialog({ return ( handleClose()}> - <> - {view === SettingsDialogView.SelectSetting && ( - - )} - {view === SettingsDialogView.NetworkSettings && ( - - )} - + {view === SettingsDialogView.SelectSetting && ( + + )} + {view === SettingsDialogView.NetworkSettings && ( + + )} ); } diff --git a/apps/wallet-dashboard/components/Dialogs/settings/views/NetworkSelectorView.tsx b/apps/wallet-dashboard/components/Dialogs/settings/views/NetworkSelectorView.tsx index cc9b573a9a9..9eb2d3a80d4 100644 --- a/apps/wallet-dashboard/components/Dialogs/settings/views/NetworkSelectorView.tsx +++ b/apps/wallet-dashboard/components/Dialogs/settings/views/NetworkSelectorView.tsx @@ -19,6 +19,8 @@ export function NetworkSelectorView({ }: NetworkSelectorViewProps): JSX.Element { const clientContext = useIotaClientContext(); const activeNetwork = clientContext.network; + // Dashboard doesn't support RPCs yet + const networks = clientContext.networks as Record; async function handleNetworkChange(network: NetworkConfiguration) { if (activeNetwork === network.id) { @@ -27,25 +29,21 @@ export function NetworkSelectorView({ clientContext.selectNetwork(network.id); toast.success(`Switched to ${network.name}`); } + return (
- {Object.keys(clientContext.networks).map((network) => { - const networkConfig = clientContext.networks[ - network - ] as NetworkConfiguration; - return ( -
- handleNetworkChange(networkConfig)} - /> -
- ); - })} + {Object.values(networks).map((network) => ( +
+ handleNetworkChange(network)} + /> +
+ ))}
diff --git a/apps/wallet-dashboard/components/Dialogs/settings/views/SettingsListView.tsx b/apps/wallet-dashboard/components/Dialogs/settings/views/SettingsListView.tsx index 5ed55017ab9..7e9d484de73 100644 --- a/apps/wallet-dashboard/components/Dialogs/settings/views/SettingsListView.tsx +++ b/apps/wallet-dashboard/components/Dialogs/settings/views/SettingsListView.tsx @@ -26,17 +26,16 @@ interface SettingsListViewProps { export function SettingsListView({ handleClose, setView }: SettingsListViewProps): JSX.Element { const { network } = useIotaClientContext(); const { name: networkName } = getNetwork(network); - function onSelectSettingClick(view: SettingsDialogView): void { - setView(view); - } + const MENU_ITEMS = [ { title: 'Network', subtitle: networkName, icon: , - onClick: () => onSelectSettingClick(SettingsDialogView.NetworkSettings), + onClick: () => setView(SettingsDialogView.NetworkSettings), }, ]; + return (
From 2e1eb073606a94ec3300ae8a7ed9f90a23bd9c29 Mon Sep 17 00:00:00 2001 From: Dr-Electron Date: Thu, 19 Dec 2024 11:33:35 +0100 Subject: [PATCH 2/4] fix: fix broken links (#4439) --- crates/iota-json-rpc-types/src/iota_object.rs | 1 - crates/iota-move-build/src/lib.rs | 4 +++- crates/iota-open-rpc/spec/openrpc.json | 2 +- sdk/typescript/src/client/types/generated.ts | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/iota-json-rpc-types/src/iota_object.rs b/crates/iota-json-rpc-types/src/iota_object.rs index 45d1eaff03d..8a7947d2b67 100644 --- a/crates/iota-json-rpc-types/src/iota_object.rs +++ b/crates/iota-json-rpc-types/src/iota_object.rs @@ -209,7 +209,6 @@ pub struct IotaObjectData { /// The Display metadata for frontend UI rendering, default to be None /// unless IotaObjectDataOptions.showContent is set to true This can also /// be None if the struct type does not have Display defined - /// See more details in #[serde(skip_serializing_if = "Option::is_none")] pub display: Option, /// Move object content or package content, default to be None unless diff --git a/crates/iota-move-build/src/lib.rs b/crates/iota-move-build/src/lib.rs index 260c2ce2ef8..309885fcbf1 100644 --- a/crates/iota-move-build/src/lib.rs +++ b/crates/iota-move-build/src/lib.rs @@ -204,7 +204,9 @@ pub fn decorate_warnings(warning_diags: Diagnostics, files: Option<&MappedFiles> report_warnings(f, warning_diags); } if any_linter_warnings { - eprintln!("Please report feedback on the linter warnings at https://forums.iota.io\n"); + eprintln!( + "Please report feedback on the linter warnings at https://github.com/iotaledger/iota/issues\n" + ); } if filtered_diags_num > 0 { eprintln!( diff --git a/crates/iota-open-rpc/spec/openrpc.json b/crates/iota-open-rpc/spec/openrpc.json index 5a54a311381..95f08307724 100644 --- a/crates/iota-open-rpc/spec/openrpc.json +++ b/crates/iota-open-rpc/spec/openrpc.json @@ -9700,7 +9700,7 @@ ] }, "display": { - "description": "The Display metadata for frontend UI rendering, default to be None unless IotaObjectDataOptions.showContent is set to true This can also be None if the struct type does not have Display defined See more details in ", + "description": "The Display metadata for frontend UI rendering, default to be None unless IotaObjectDataOptions.showContent is set to true This can also be None if the struct type does not have Display defined", "anyOf": [ { "$ref": "#/components/schemas/DisplayFieldsResponse" diff --git a/sdk/typescript/src/client/types/generated.ts b/sdk/typescript/src/client/types/generated.ts index 113119521fe..26c4f5a9d2f 100644 --- a/sdk/typescript/src/client/types/generated.ts +++ b/sdk/typescript/src/client/types/generated.ts @@ -1020,7 +1020,7 @@ export interface IotaObjectData { /** * The Display metadata for frontend UI rendering, default to be None unless * IotaObjectDataOptions.showContent is set to true This can also be None if the struct type does not - * have Display defined See more details in + * have Display defined */ display?: DisplayFieldsResponse | null; objectId: string; From f5f3354870e205ea39c37eba150a4473ad010149 Mon Sep 17 00:00:00 2001 From: evavirseda Date: Thu, 19 Dec 2024 12:02:24 +0100 Subject: [PATCH 3/4] fix(explorer): fix incorrect unit in homepage reference gas price (#4561) --- apps/explorer/src/components/home-metrics/OnTheNetwork.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/explorer/src/components/home-metrics/OnTheNetwork.tsx b/apps/explorer/src/components/home-metrics/OnTheNetwork.tsx index d98dc4b126f..35bd6468232 100644 --- a/apps/explorer/src/components/home-metrics/OnTheNetwork.tsx +++ b/apps/explorer/src/components/home-metrics/OnTheNetwork.tsx @@ -98,7 +98,7 @@ export function OnTheNetwork(): JSX.Element { size={LabelTextSize.Large} label="Reference Gas Price" text={gasPriceFormatted ?? '-'} - supportingLabel={gasPriceFormatted !== null ? 'IOTA' : undefined} + supportingLabel={gasPriceFormatted !== null ? 'nano' : undefined} tooltipPosition={TooltipPosition.Top} tooltipText="The reference gas price in the current epoch." /> From 1bd64f9e18b7a1d1badef1ab4869699e27aa6160 Mon Sep 17 00:00:00 2001 From: vivekjain23 <165671934+vivekjain23@users.noreply.github.com> Date: Thu, 19 Dec 2024 19:02:20 +0530 Subject: [PATCH 4/4] fix(docs): Fix feedback form UI (#4549) * Fix feedback form UI --- docs/site/src/components/FeedbackForm/index.tsx | 2 -- docs/site/src/components/FeedbackForm/styles.css | 12 +++++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/site/src/components/FeedbackForm/index.tsx b/docs/site/src/components/FeedbackForm/index.tsx index 8613ffdf7a3..5dcf5af6d40 100644 --- a/docs/site/src/components/FeedbackForm/index.tsx +++ b/docs/site/src/components/FeedbackForm/index.tsx @@ -20,7 +20,6 @@ const FeedbackForm = () => { return (
-
Feedback Form
@@ -54,7 +53,6 @@ const FeedbackForm = () => { Submit Feedback -
); }; diff --git a/docs/site/src/components/FeedbackForm/styles.css b/docs/site/src/components/FeedbackForm/styles.css index 4e742a9afb3..4aafcee2f8e 100644 --- a/docs/site/src/components/FeedbackForm/styles.css +++ b/docs/site/src/components/FeedbackForm/styles.css @@ -1,5 +1,15 @@ .feedback-container { - /* margin: 20px; */ + background-color: #0000001a; + padding-top: 0.25rem; + padding-left: 2rem; + padding-right: 2rem; + padding-bottom: 1.25rem; + margin-top: 1rem; + border-radius: 0.5rem; +} + +[data-theme="dark"] .feedback-container { + background-color: #1e1e1e; } .feedback-header {