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
Nc fix: add missing formula docs and link #7987
Conversation
WalkthroughWalkthroughThe recent updates focus on enhancing formula functionalities within a GUI component and documentation, alongside SDK support for new date and generic formula functions. A conditional rendering logic was added to ensure the existence of a documentation URL before rendering it in the GUI. The documentation now includes new date functions ( Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files selected for processing (2)
- packages/nc-gui/components/smartsheet/column/FormulaOptions.vue (1 hunks)
- packages/nocodb-sdk/src/lib/formulaHelpers.ts (1 hunks)
Additional comments: 1
packages/nc-gui/components/smartsheet/column/FormulaOptions.vue (1)
- 335-335: The conditional rendering logic to check for the existence of
suggestionPreviewed.docsUrl
before rendering the link is correctly implemented and follows Vue best practices. It's also good to see the use oftarget="_blank"
andrel="noopener noreferrer"
for security. To enhance readability, consider destructuringsuggestionPreviewed
at the beginning of the template or computed properties to simplify access to its properties throughout the template.
Uffizzi Preview |
1cab925
to
b171223
Compare
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (3)
- packages/nc-gui/components/smartsheet/column/FormulaOptions.vue (1 hunks)
- packages/noco-docs/docs/070.fields/040.field-types/060.formula/040.date-functions.md (1 hunks)
- packages/nocodb-sdk/src/lib/formulaHelpers.ts (1 hunks)
Files skipped from review as they are similar to previous changes (2)
- packages/nc-gui/components/smartsheet/column/FormulaOptions.vue
- packages/nocodb-sdk/src/lib/formulaHelpers.ts
Additional comments (3)
packages/noco-docs/docs/070.fields/040.field-types/060.formula/040.date-functions.md (3)
- 97-113: The documentation for the
DATESTR
function is clear and concise, providing a good understanding of its purpose, syntax, and usage. However, to enhance clarity, consider specifying the expected input format for thedate | datetime
parameter in the syntax and sample sections. This addition would help users understand the acceptable formats they can use with this function.- 116-132: The
DAY
function documentation is well-written, clearly explaining its functionality, syntax, and providing a straightforward example. It's good practice to maintain this level of detail and clarity for all function documentations.- 135-151: The documentation for the
MONTH
function is clear and effectively communicates its purpose, syntax, and usage through a concise example. This consistency in documentation style is beneficial for user comprehension.
b171223
to
1475507
Compare
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.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files selected for processing (3)
- packages/nc-gui/components/smartsheet/column/FormulaOptions.vue (1 hunks)
- packages/noco-docs/docs/070.fields/040.field-types/060.formula/040.date-functions.md (1 hunks)
- packages/nocodb-sdk/src/lib/formulaHelpers.ts (8 hunks)
Files skipped from review as they are similar to previous changes (2)
- packages/nc-gui/components/smartsheet/column/FormulaOptions.vue
- packages/nocodb-sdk/src/lib/formulaHelpers.ts
Additional comments (4)
packages/noco-docs/docs/070.fields/040.field-types/060.formula/040.date-functions.md (4)
- 97-112: The documentation for the
DATESTR
function is clear and concise. However, consider adding examples that include edge cases or errors to provide a more comprehensive understanding for users.- 116-131: The
DAY
function documentation is well-written. To enhance clarity, you might include information about how the function behaves with invalid dates or times.- 135-150: The documentation for the
MONTH
function is accurate and informative. It could be beneficial to add a note about the function's behavior in different locales or time zones, if applicable.- 154-168: The
HOUR
function documentation is succinct and to the point. Including examples with different time formats might help users understand the function's versatility.
packages/noco-docs/docs/070.fields/040.field-types/060.formula/040.date-functions.md
Show resolved
Hide resolved
1475507
to
fd64f6b
Compare
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (3)
- packages/nc-gui/components/smartsheet/column/FormulaOptions.vue (1 hunks)
- packages/noco-docs/docs/070.fields/040.field-types/060.formula/040.date-functions.md (1 hunks)
- packages/nocodb-sdk/src/lib/formulaHelpers.ts (8 hunks)
Files skipped from review as they are similar to previous changes (2)
- packages/nc-gui/components/smartsheet/column/FormulaOptions.vue
- packages/nocodb-sdk/src/lib/formulaHelpers.ts
Additional comments (4)
packages/noco-docs/docs/070.fields/040.field-types/060.formula/040.date-functions.md (4)
- 97-112: The documentation for the
DATESTR
function is clear and concise. However, consider adding an example that includes a datetime with a non-midnight time to illustrate that the time part is indeed ignored.- 116-131: The documentation for the
DAY
function is well-written. It might be beneficial to include a note or example to clarify that the function works with both date and datetime inputs, as the current examples only show date inputs.- 135-150: The documentation for the
MONTH
function is clear. To enhance understanding, consider adding a brief note on how months are numbered (January as 1, December as 12) for clarity, especially for users from different backgrounds.- 154-168: The documentation for the
HOUR
function is concise. It would be helpful to include an example with a PM time to demonstrate how the function handles 24-hour times, as the current example only shows a time within the AM range.
fd64f6b
to
49f43f1
Compare
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (3)
- packages/nc-gui/components/smartsheet/column/FormulaOptions.vue (1 hunks)
- packages/noco-docs/docs/070.fields/040.field-types/060.formula/040.date-functions.md (2 hunks)
- packages/nocodb-sdk/src/lib/formulaHelpers.ts (8 hunks)
Files skipped from review as they are similar to previous changes (2)
- packages/nc-gui/components/smartsheet/column/FormulaOptions.vue
- packages/nocodb-sdk/src/lib/formulaHelpers.ts
Additional comments (5)
packages/noco-docs/docs/070.fields/040.field-types/060.formula/040.date-functions.md (5)
- 25-25: The suggested grammatical improvement has been correctly implemented. Good attention to detail!
- 97-112: The
DATESTR
function documentation is clear and concise, effectively explaining its purpose and usage. The example provided is straightforward and demonstrates the function's behavior well.- 116-131: The
DAY
function documentation is well-written, providing a clear explanation of the function's purpose and usage. The examples are helpful in understanding how the function works.- 135-150: The
MONTH
function documentation is clear and informative, effectively explaining how the function works and providing useful examples.- 154-168: The
HOUR
function documentation is concise and clear, with a straightforward example that illustrates the function's behavior effectively.
… if docs link is present
49f43f1
to
a34a640
Compare
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (4)
- packages/nc-gui/components/smartsheet/column/FormulaOptions.vue (1 hunks)
- packages/noco-docs/docs/070.fields/040.field-types/060.formula/040.date-functions.md (2 hunks)
- packages/noco-docs/docs/070.fields/040.field-types/060.formula/060.generic-functions.md (1 hunks)
- packages/nocodb-sdk/src/lib/formulaHelpers.ts (8 hunks)
Files skipped from review as they are similar to previous changes (2)
- packages/nc-gui/components/smartsheet/column/FormulaOptions.vue
- packages/nocodb-sdk/src/lib/formulaHelpers.ts
Additional comments (5)
packages/noco-docs/docs/070.fields/040.field-types/060.formula/060.generic-functions.md (1)
- 1-24: The documentation for the
RECORD_ID
function is clear and well-structured, providing valuable information on its usage and syntax.packages/noco-docs/docs/070.fields/040.field-types/060.formula/040.date-functions.md (4)
- 97-112: The documentation for the
DATESTR
function is comprehensive and clearly explains its purpose, syntax, and usage with an example.- 116-131: The documentation for the
DAY
function is concise and informative, effectively explaining its functionality and providing a clear example.- 135-150: The documentation for the
MONTH
function is well-structured, offering clear guidance on its usage and expected output.- 154-168: The documentation for the
HOUR
function is clear and concise, effectively explaining its purpose and usage with an example.
Change Summary
Provide summary of changes with issue number if any.
Change type
Test/ Verification
Provide summary of changes.
Additional information / screenshots (optional)
Anything for maintainers to be made aware of
Summary by CodeRabbit
DATESTR
,DAY
,MONTH
,HOUR
) for enhanced date and time operations.RECORD_ID
system function.