-
Notifications
You must be signed in to change notification settings - Fork 9
Add Notes Section #10
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
Conversation
Add 'important notes' property to function schema and update notes display. Refactor style on pages
…n on functions page
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.
Since you have two PRs open, please close one and make the changes in 1 PR only thanks
@@ -163,6 +171,10 @@ $defs: | |||
description: | | |||
The default value for this parameter, if none was given in the call to the function. | |||
This property automatically implicitly marks this parameter as optional. | |||
optional: |
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.
As I explained in the other PR #9 where you tried to implement this optional attribute, it is not needed.
@@ -43,6 +43,14 @@ $defs: | |||
description: | |||
type: string | |||
description: Describes the functionality provided by the function. | |||
important_notes: |
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.
I don't think a new attribute is needed. You should change the notes attribute by giving it more properties other than description like "type" so we can specify the "importance" or color of the note (like warning).
This pull request introduces enhancements to the function schema, improves the rendering and styling of function pages, and refines the utility functions for handling function data. Key changes include the addition of new schema properties, the implementation of a reusable
NoteBox
component, and updates to thegetFunctionInfo
utility for better type definitions and data handling.Schema Enhancements:
important_notes
field to the function schema, which is an array of strings for capturing additional information about a function. (schemas/function.yaml
schemas/function.yamlR46-R53)optional
boolean property for function parameters, indicating whether a parameter is optional. (schemas/function.yaml
schemas/function.yamlR174-R177)UI Improvements:
NoteBox
component for displaying styled notes on function pages. (web/src/components/NoteBox.astro
web/src/components/NoteBox.astroR1-R21)NoteBox
component and added sections for notes and examples on function pages, improving content organization and readability. (web/src/pages/[func].astro
web/src/pages/[func].astroL22-R48, web/src/pages/[func].astroR57-R85)web/src/styles/function-page.css
web/src/styles/function-page.cssR1-R26)Utility Function Enhancements:
getFunctionInfo
to include new schema fields (important_notes
,parameters
) and improved type definitions for better maintainability. (web/src/utils/functions.ts
web/src/utils/functions.tsL36-R85)web/src/utils/functions.ts
web/src/utils/functions.tsL58-R106)