Skip to content

Add ABI viewer and clean up CSS#49

Merged
sdankel merged 10 commits intomasterfrom
sophie/css-cleanup
Apr 18, 2025
Merged

Add ABI viewer and clean up CSS#49
sdankel merged 10 commits intomasterfrom
sophie/css-cleanup

Conversation

@sdankel
Copy link
Copy Markdown
Contributor

@sdankel sdankel commented Apr 17, 2025

  • Displays the ABI in the ABI tab for contracts. I tested this locally by publishing a contract, commenting out the check for whether std has a version to make it build successfully.
image

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
forc-pub ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 17, 2025 6:21pm

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 14 out of 25 changed files in this pull request and generated no comments.

Files not reviewed (11)
  • app/package-lock.json: Language not supported
  • app/package.json: Language not supported
  • app/src/App.css: Language not supported
  • app/src/features/dahboard/components/PackageDashboard.css: Language not supported
  • app/src/features/dashboard/components/PackageDashboard.css: Language not supported
  • app/src/features/detail/components/PackageDetail.css: Language not supported
  • app/src/features/detail/components/PackageSidebar.css: Language not supported
  • app/src/features/tokens/components/CopyableToken.css: Language not supported
  • app/src/features/toolbar/components/SearchBar.css: Language not supported
  • app/src/features/toolbar/components/UserButton.css: Language not supported
  • app/src/pages/ApiTokens.css: Language not supported
Comments suppressed due to low confidence (1)

app/src/features/detail/components/PackageDetail.tsx:7

  • The alias 'TabNames' for the imported Tab component conflicts with the type alias also named 'TabNames'. Consider renaming the component import (e.g., to 'MuiTab') to avoid confusion.
import { Tab as TabNames } from "@mui/material";

@sdankel sdankel marked this pull request as ready for review April 17, 2025 07:38
@sdankel sdankel requested a review from a team April 17, 2025 07:39
@zees-dev
Copy link
Copy Markdown
Contributor

zees-dev commented Apr 17, 2025

Note: MUI is pretty heavy-weight (from when i last used it years ago; tailwind supported library (utils lib) may give more freedom - especially since AI seems to be quite good with tailwind).

This may not be true today though - so worthwhile looking at the size of the CSS/lib dependency loaded in browser.

@zees-dev
Copy link
Copy Markdown
Contributor

Would be great to have a copy-to-clipboard button for the ABI too

@sdankel
Copy link
Copy Markdown
Contributor Author

sdankel commented Apr 17, 2025

Note: MUI is pretty heavy-weight (from when i last used it years ago; tailwind supported library (utils lib) may give more freedom - especially since AI seems to be quite good with tailwind).

This may not be true today though - so worthwhile looking at the size of the CSS/lib dependency loaded in browser.

Glad you brought this up! The bundle size is under 1MB so not a problem yet. MUI used to have a bigger problem with bloating node_modules in the past (specifically module duplication), and it is still a problem if you import components from the top-level like import CloudDownloadIcon from "@mui/icons-material rather than importing from the specific module. More about it here: https://mui.com/material-ui/guides/minimizing-bundle-size/

I'll add eslint in another PR with a rule to catch problematic imports.

Here's the bundle analysis:
image

Copy link
Copy Markdown
Contributor

@zees-dev zees-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for the bundle analysis - LGTM! 👍

nit: the copy-to-clipboard could be a little lighter shade of white/gray since its not very subtle. Can be done in future PR though (if you also agree).

@sdankel sdankel merged commit d080486 into master Apr 18, 2025
10 checks passed
@sdankel sdankel deleted the sophie/css-cleanup branch April 18, 2025 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

forc.pub api key can be generated without a name

3 participants