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

First attempt at a style guide #3408

Merged
merged 13 commits into from
Oct 16, 2024
Merged

First attempt at a style guide #3408

merged 13 commits into from
Oct 16, 2024

Conversation

OAGr
Copy link
Contributor

@OAGr OAGr commented Oct 7, 2024

No description provided.

Copy link

changeset-bot bot commented Oct 7, 2024

⚠️ No Changeset found

Latest commit: 8c5b6aa

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

Copy link

vercel bot commented Oct 7, 2024

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

Name Status Preview Updated (UTC)
squiggle-website ✅ Ready (Inspect) Visit Preview Oct 15, 2024 6:43pm
3 Skipped Deployments
Name Status Preview Updated (UTC)
quri-hub ⬜️ Ignored (Inspect) Visit Preview Oct 15, 2024 6:43pm
quri-ui ⬜️ Ignored (Inspect) Visit Preview Oct 15, 2024 6:43pm
squiggle-components ⬜️ Ignored (Inspect) Visit Preview Oct 15, 2024 6:43pm

packages/website/public/llms/styleGuide.md Outdated Show resolved Hide resolved
packages/website/public/llms/styleGuide.md Outdated Show resolved Hide resolved
packages/website/public/llms/styleGuide.md Outdated Show resolved Hide resolved
packages/website/public/llms/styleGuide.md Outdated Show resolved Hide resolved
packages/website/public/llms/styleGuide.md Outdated Show resolved Hide resolved

### Dictionaries

- In dictionaries, if a key name is the same as a variable name, use the variable name directly. For example, instead of {value: value}, just use {value}. If there's only one key, you can type it with a comma, like this: {value,}.
Copy link
Collaborator

Choose a reason for hiding this comment

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

instead of {value: value}, just use {value}

I'd add a comma even in this first example, otherwise it's incorrect, or give the first example with two keys/values.

packages/website/public/llms/styleGuide.md Outdated Show resolved Hide resolved
packages/website/public/llms/styleGuide.md Outdated Show resolved Hide resolved
packages/website/public/llms/styleGuide.md Outdated Show resolved Hide resolved
net_benefit = benefits - costs // valid for @format()
```

- This mainly makes sense for dollar amounts, percentages, and dates. ".0%" is a decent format for percentages, and "$,.0f" can be used for dollars.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe mention explicitly that @format uses d3-format specs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is already in the docs, and so far, the LLM has always seemed to understand this.

@OAGr OAGr marked this pull request as ready for review October 12, 2024 16:50
@OAGr OAGr marked this pull request as draft October 12, 2024 17:14
@OAGr
Copy link
Contributor Author

OAGr commented Oct 16, 2024

I want to merge this to start using it in Squiggle AI. We can definitely make more changes shortly.

@OAGr OAGr merged commit b0721d6 into main Oct 16, 2024
6 checks passed
@OAGr OAGr deleted the ai-styleguide branch October 16, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants