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

docs: add table tutorial #1273

Merged
merged 36 commits into from
Aug 23, 2023
Merged

docs: add table tutorial #1273

merged 36 commits into from
Aug 23, 2023

Conversation

qbzzt
Copy link
Contributor

@qbzzt qbzzt commented Aug 10, 2023

No description provided.

@qbzzt qbzzt requested review from alvrs and holic as code owners August 10, 2023 02:08
@changeset-bot
Copy link

changeset-bot bot commented Aug 10, 2023

⚠️ No Changeset found

Latest commit: 0987732

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@qbzzt
Copy link
Contributor Author

qbzzt commented Aug 15, 2023

@alvrs and @holic , once I put in all the comments requested by both of you, is it OK if I just merge or do you want to do a final pass and approval?

docs/pages/tutorials/minimal/_meta.js Show resolved Hide resolved
docs/pages/tutorials/minimal/extend_schema.mdx Outdated Show resolved Hide resolved
docs/pages/tutorials/minimal/extend_schema.mdx Outdated Show resolved Hide resolved
docs/pages/tutorials/minimal/extend_schema.mdx Outdated Show resolved Hide resolved
In this case, the counter value is represented as a 32 bit unsigned integer, because that is what `Counter` uses.
Block numbers and timestamps can be values up to `uint256`, so we'll use this type for these fields.

</details>
Copy link
Member

Choose a reason for hiding this comment

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

should we indent this to the same level as the 1.?

Copy link
Contributor Author

@qbzzt qbzzt Aug 18, 2023

Choose a reason for hiding this comment

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

Yes, we should. However, when I do it the prettier script breaks it. :-(

When I try to indent and then commit, prettier "fixes" it to this:

    <details>
 <summary>Explanation</summary>

   A MUD table has two schemas:

   - `keySchema`, the key used to find entries
   - `schema`, the value in the entry (soon to be renamed to `valueSchema`)

   Each schema is represented as a structure with field names as keys, and the appropriate [Solidity data types](https://docs.soliditylang.org/en/latest/types.html) as their values.

   In this case, the counter value is represented as a 32 bit unsigned integer, because that is what `Counter` uses.
   Block numbers and timestamps can be values up to `uint256`, so we'll use this type for these fields.

    </details>

And then I get this error:

./pages/tutorials/minimal/add-table.mdx
Expected a closing tag for `<details>` (42:5-42:14) before the end of `listItem`

I spent enough time on it that I decided it's not worth hassling with anymore.

Copy link
Member

@holic holic Aug 23, 2023

Choose a reason for hiding this comment

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

I think the trick to get it to work is add a blank line between the opening/closing tags and the contents, like we did for the <CollapseCode>.

Maybe there's an update to prettier that fixes these. Will look!

docs/pages/tutorials/minimal/extend_schema.mdx Outdated Show resolved Hide resolved
docs/pages/tutorials/minimal/extend_schema.mdx Outdated Show resolved Hide resolved
@qbzzt qbzzt changed the title docs: Extend schema tutorial docs: Add table tutorial Aug 18, 2023
@alvrs alvrs changed the title docs: Add table tutorial docs: add table tutorial Aug 23, 2023
@qbzzt qbzzt merged commit 293f2f7 into main Aug 23, 2023
11 checks passed
@qbzzt qbzzt deleted the 230802-minimal-extend-schema branch August 23, 2023 10:26
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.

None yet

3 participants