Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup Proposals App Frame #91

Open
earth2travis opened this issue Jan 13, 2025 · 13 comments
Open

Setup Proposals App Frame #91

earth2travis opened this issue Jan 13, 2025 · 13 comments
Assignees
Milestone

Comments

@earth2travis
Copy link
Contributor

Implement frame structure for the Proposals app, establishing the core connect/disconnect functionality and basic navigation between views.

  • Initial frame setup with connect/disconnect flow
  • Basic navigation structure

https://github.com/HausDAO/farcastle-proposals-frame

@earth2travis earth2travis added this to the Level 3 milestone Jan 13, 2025
@skuhlmann skuhlmann self-assigned this Jan 16, 2025
@skuhlmann
Copy link
Contributor

@earth2travis

added a sample form to play with field types and styles and identify needs

HausDAO/farcastle-proposals-frame#3

Image
Image

@skuhlmann
Copy link
Contributor

I think we could set up a deployment of this in cloudflare soon.

@earth2travis
Copy link
Contributor Author

Took a swing at the form here: https://github.com/HausDAO/farcastle-proposals-frame/tree/style-sample

@earth2travis
Copy link
Contributor Author

@earth2travis earth2travis self-assigned this Jan 18, 2025
@earth2travis
Copy link
Contributor Author

We can rebuild him: HausDAO/farcastle-proposals-frame#6

@earth2travis
Copy link
Contributor Author

earth2travis commented Jan 22, 2025

  • Generate domain manifest
  • Add images
  • Update layout.tsx

HausDAO/farcastle-proposals-frame#11

  • Deploy to Cloudflare
  • Configure proposals.farcastle.net subdomain
  • Verify domain manifest

@earth2travis
Copy link
Contributor Author

earth2travis commented Jan 22, 2025

Trying to work through all the errors getting it deployed to Cloudflare

The robot overlords were requesting some changes to useDao.ts that were getting above my pay grade

Made a copy of the working file called useDaoSam.ts

Changes made to useDao.ts

The issue is in this chain of dependencies:

  1. Root layout uses <Providers>
  2. Providers includes <DaoRecordProvider>
  3. DaoRecordProvider uses useDao hook
  4. useDao hook uses useDaoHooksConfig
  5. useDaoHooksConfig requires DaoHooksContext

The key issue is in the useDao hook where it immediately checks for the config:

const { config } = useDaoHooksConfig();

if (!config || !config.graphKey) {
  throw new Error("DaoHooksContext must be used within a DaoHooksProvider");
}

During static build time, this check is happening before the context is ready.

Modify the useDao hook to be more resilient during static builds:

  • Remove the explicit error throw
  • Return early with a default value if we don't have the required data
  • Add the config check to the enabled condition of useQuery

This should allow the static build to complete without throwing the context error, while still maintaining the functionality during runtime.

  • Move the useQuery hook before the early return and make it conditional via the enabled flag
  • Handle the type for useQuery: useQuery<{ dao: DaoItem }>
  • Separate the hook declarations from the conditional logic by moving all hooks to the top

Key changes:

  • Moved all hooks to the top
  • Moved conditional logic inside the queryFn
  • Using enabled flag to control execute

@earth2travis
Copy link
Contributor Author

Got GitHub all jacked up. From what I can tell this was the last working commit: HausDAO/farcastle-proposals-frame@6d75710

@earth2travis
Copy link
Contributor Author

earth2travis commented Feb 12, 2025

Design List

  • Colors are all muted in a weird way
  • Add loading components
  • Update warning color
  • Castle should probably link to the choose DAO view 🤷 (Sam)
  • Maybe more padding below header

  • Add icon for the connected network on the Select DAO view
  • Icon for the connected network becomes the DAO icon on all other views

Unsure about this ☝

  • Maybe the connected network is just the labels: Ethereal Castles, Optimistic Castles, Based Castles, Gnostic Castles, Arbitral Castle, Polymorphic Castles, Sepolic Castles

Should we display the users avatar in the upper left hand corner instead? That way it feels personalized and they know what wallet is connected


  • All views should be in a card
    • Keep styling at top level not in the form components
  • All buttons should be full width
  • DAO buttons should be cards
  • DAO cards should have the DAO icon
  • DAO cards should display the number of Active Proposal(s)
  • Experiment with different styles for the DAO buttons (maybe just an outline)
  • DAO card should only be one per line
  • DAO card should open the drawer from the bottom
  • Heading on the view to click proposal type should be Make Proposal
  • Buttons should read Signal, Funding, Membership
  • Need view for no DAOs

  • Form Labels should be smaller (try them pixel font blue)
  • Make the D in description uppercase in the placeholder text
  • Remove link from Signal Proposal
  • Buttons on forms should say Make Proposal
  • Need view for success
  • Cast Proposal did not work for a DAO I did not have shares in
  • Reduce space below Cast Proposal button
  • Change View on Block Explorer to View Transaction

@earth2travis
Copy link
Contributor Author

earth2travis commented Feb 12, 2025

@skuhlmann

  • Investigate bug with cast button going to Game Over view in v1 frame
    • Thought it may be related to unsponsored proposal
    • Was able to replicate for a DAO we were a member of
  • Update links in header
    • Castle will go to DaoList
    • proposals will go to select proposal view
  • Add DAO icon and active proposal count to DAO cards
  • Remove link field from Signal and Member ship proposals

@earth2travis
Copy link
Contributor Author

earth2travis commented Feb 12, 2025

@earth2travis

App

  • Add loading components (DaoList, dao-home, proposal)
  • Remove duplicate manifest
  • Figure out why colors are all muted
  • Put all views in a card
    • Keep styling at top level not in the form components
  • Make all buttons full width
  • Maybe add padding below header
  • Fix frame embed on /dao routes (check image path in console)

Connect View

  • Remove commented code

DAOs List View

  • Update connected network headings: Ethereal Castles, Optimistic Castles, Based Castles, Gnostic Castles, Arbitral Castle, Polymorphic Castles, Sepolic Castles
  • Make DAO buttons cards
    • Add DAO icon
    • Display the number of Active Proposal(s)
  • Experiment with different styles for the DAO cards (maybe just an outline)
  • Make each DAO card a row
  • Add view for no DAOs
  • Experiment with adding drawers (may not work with routes)
  • Consider icon for the connected network

Make Proposal View

  • Remove Sample button and route
  • Update button text: Signal, Funding, Membership
  • Add something about the DAO and the icon
  • Replace connected network icon with DAO icon

Proposals

  • Update button text on all forms: Make Proposal
  • Update form label style (try them pixel font blue or make smaller)
  • Make the D in description uppercase in placeholder text
  • Update validation messages
  • Update warning color

Success View

  • Reduce space below Cast Proposal button
  • Change View on Block Explorer button text to View Transaction
  • Update success view like v1 frame Castlevania

Questions

  • Should we display the users avatar in the upper left hand corner? (feels personalized and they know what wallet is connected)

@skuhlmann
Copy link
Contributor

@skuhlmann

    • Investigate bug with cast button going to Game Over view in v1 frame

      • Thought it may be related to unsponsored proposal* Was able to replicate for a DAO we were a member of* [x] Update links in header

      • Castle will go to DaoList* proposals will go to select proposal view[ ] Add DAO icon and active proposal count to DAO cards[x] Remove link field from Signal and Member ship proposals

almost have a 1st draft of all this
HausDAO/farcastle-proposals-frame#26

@skuhlmann
Copy link
Contributor

finishes the active proposal count and adds a new hook
HausDAO/farcastle-proposals-frame#30

Image

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

No branches or pull requests

2 participants