-
Notifications
You must be signed in to change notification settings - Fork 99
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
Suggested edits to data #95
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The part about when parameters are other Mavo properties is very confusing without an example or suggested course of action. I would just skip that for now, and focus on how they can add functions, both as globals and on Mavo.Functions
. I would add it as a small section in the end, with a title like "Custom functions"
@DmitrySharabin This is not urgent at all, but why can't I preview Parul's changes via the link above? Does it have to do with the PR plugin? |
I also noticed that. Will take a look. |
Good point @LeaVerou, I updated the docs with the 'Custom Functions' section right after "Function Calls". Let me know if I should make any changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi there,
There is still no example of either of these things. Keep in mind that the target audience may not even know what a global is, they need to see it. Similarly, they may not know what adding them on Mavo.Functions
means. In general, "show, don't tell" is a good rule of thumb for technical writing.
Hi there 👋🏻 @LeaVerou, I gave it a closer look and sent two PRs (to Do we need the source in this app? |
@LeaVerou you can review this change (updated to include example of adding js function to Mavoscript: Mavoscript.Functions.increment = function(param) {return param+1}). |
@DmitrySharabin We don't really need the source, it was just to avoid the API request when loading the data. But it looks like that check needs to change, since it's introducing bugs. Also, I shouldn't be seeing this dialog when visiting someone else's data: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- "JS" should be uppercase, as it's an acronym.
- Please show an example of defining them as globals. Many novices don't know what that means.
- It would be nice to have a somewhat more useful example than an increment function. What are some cases where we have needed custom functions that are simple enough for an introductory example?
I'll do my best to fix it. |
@LeaVerou I updated the function to be a logical xor custom JS function, so you can look over the changes and let me know, thanks! |
Hello there! I used Mavo to suggest the following edits:
I added sentences to "Function calls" to describe calling js functions
Preview my changes here: https://mavo.io/docs/expressions?storage=https%3A%2F%2Fraw.githubusercontent.com%2Fparulsingh23%2Fmavo.io%2Fmaster%2Fdocs%2Fdocs.json&docs-storage=https%3A%2F%2Fgithub.com%2Fmavoweb%2Fmavo.io%2Fdocs%2Fdocs.json