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

Nc fix: add missing formula docs and link #7987

Merged
merged 7 commits into from Mar 28, 2024

Conversation

rameshmane7218
Copy link
Collaborator

@rameshmane7218 rameshmane7218 commented Mar 27, 2024

Change Summary

Provide summary of changes with issue number if any.

Change type

  • feat: (new feature for the user, not a new feature for build script)
  • fix: (bug fix for the user, not a fix to a build script)
  • docs: (changes to the documentation)
  • style: (formatting, missing semi colons, etc; no production code change)
  • refactor: (refactoring production code, eg. renaming a variable)
  • test: (adding missing tests, refactoring tests; no production code change)
  • chore: (updating grunt tasks etc; no production code change)

Test/ Verification

Provide summary of changes.

Additional information / screenshots (optional)

Anything for maintainers to be made aware of

Summary by CodeRabbit

  • New Features
    • Introduced new date-related formula functions (DATESTR, DAY, MONTH, HOUR) for enhanced date and time operations.
    • Added documentation for "Generic Functions" in formula fields, including details on the RECORD_ID system function.
  • Bug Fixes
    • Improved the user interface by adding conditional rendering to ensure documentation links are only displayed when available.

@rameshmane7218 rameshmane7218 added the 🛑 Status: Do Not Merge Used in PR only. The PR cannot be merged due to some reasons. label Mar 27, 2024
Copy link
Contributor

coderabbitai bot commented Mar 27, 2024

Walkthrough

Walkthrough

The 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 (DATESTR, DAY, MONTH, HOUR) and introduces generic functions, highlighting the RECORD_ID function. Additionally, the SDK has been updated to include docsUrl properties for various formulas, improving developer support and user experience.

Changes

File Path Change Summary
.../smartsheet/column/FormulaOptions.vue Added conditional rendering for docsUrl in anchor tags.
.../docs/.../formula/040.date-functions.md Added documentation for new date functions: DATESTR, DAY, MONTH, HOUR.
.../docs/.../formula/060.generic-functions.md Introduced documentation for generic functions, specifically the RECORD_ID function.
.../nocodb-sdk/.../formulaHelpers.ts Added docsUrl properties for various formulas.

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?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits Files that changed from the base of the PR and between 935085b and 1cab925.
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 of target="_blank" and rel="noopener noreferrer" for security. To enhance readability, consider destructuring suggestionPreviewed at the beginning of the template or computed properties to simplify access to its properties throughout the template.

packages/nocodb-sdk/src/lib/formulaHelpers.ts Outdated Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Mar 27, 2024

Uffizzi Preview deployment-49050 was deleted.

@o1lab o1lab force-pushed the nc-fix/add-missing-formula-docs-and-link branch from 1cab925 to b171223 Compare March 28, 2024 03:44
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits Files that changed from the base of the PR and between f5d0c73 and b171223.
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 the date | 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.

@o1lab o1lab force-pushed the nc-fix/add-missing-formula-docs-and-link branch from b171223 to 1475507 Compare March 28, 2024 03:53
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits Files that changed from the base of the PR and between f5d0c73 and 1475507.
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.

@o1lab o1lab force-pushed the nc-fix/add-missing-formula-docs-and-link branch from 1475507 to fd64f6b Compare March 28, 2024 04:40
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits Files that changed from the base of the PR and between f5d0c73 and fd64f6b.
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.

@o1lab o1lab force-pushed the nc-fix/add-missing-formula-docs-and-link branch from fd64f6b to 49f43f1 Compare March 28, 2024 04:49
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits Files that changed from the base of the PR and between f5d0c73 and 49f43f1.
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.

@o1lab o1lab force-pushed the nc-fix/add-missing-formula-docs-and-link branch from 49f43f1 to a34a640 Compare March 28, 2024 06:14
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits Files that changed from the base of the PR and between f5d0c73 and a34a640.
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.

@dstala dstala merged commit 2e132bf into develop Mar 28, 2024
23 checks passed
@dstala dstala deleted the nc-fix/add-missing-formula-docs-and-link branch March 28, 2024 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛑 Status: Do Not Merge Used in PR only. The PR cannot be merged due to some reasons.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants