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

Add basic operators to the syntax widget #165

Conversation

kevanstannard
Copy link
Contributor

@kevanstannard kevanstannard commented Jan 4, 2021

Suggestion for #162

Add some of the basic operators.

Happy to hear any corrections or suggestions for improvements.

@@ -87,6 +114,78 @@ let allItems = [
category: Other,
component: controlflow_ifelse,
},
{
id: "integer-addition",
Copy link
Member

Choose a reason for hiding this comment

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

this data is good for drafting and testing, but since we will include a ton of syntax constructs, I am pretty sure that this will not scale on a bundle level, so we need to factor everything out into some server side rendered solution of some sort.

So what I think would be best is to put the metadata in the frontmatter of each syntax construct file, e.g. operators_integer_addition.mdx:

---
id: "integer-addition"
keywords: ["plus", "add", "addition", "sum", "int", "integer"]
name: "+"
summary: "This is the `integer addition` operator."
category: "operators"
---

You can of course still hook your components up with the SyntaxLookupWidget to test your keywords, but we will remove that code pretty soon later on, just so you know.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @ryyppy that makes sense, updated.

@ryyppy
Copy link
Member

ryyppy commented Jan 4, 2021

Looking good. Will merge this for now and update the overview issue

@ryyppy ryyppy merged commit bd2a478 into rescript-lang:syntax-lookup-tool Jan 4, 2021
@kevanstannard kevanstannard deleted the syntax-widget-basic-operators branch January 5, 2021 06:41
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.

2 participants