8000 fix: ui acl issue by DarkPhoenix2704 · Pull Request #8916 · nocodb/nocodb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: ui acl issue #8916

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

Merged
merged 1 commit into from
Jul 3, 2024
Merged

fix: ui acl issue #8916

merged 1 commit into from
Jul 3, 2024

Conversation

DarkPhoenix2704
Copy link
Member
@DarkPhoenix2704 DarkPhoenix2704 commented Jul 3, 2024

Change Summary

Provide summary of changes with issue number if any.

Closes #8905

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

@DarkPhoenix2704 DarkPhoenix2704 requested a review from mertmit July 3, 2024 08:41
Copy link
Contributor
coderabbitai bot commented Jul 3, 2024
Walkthrough

Walkthrough

This update primarily addresses two separate aspects: tooltip rendering and caching behavior. In the UI component UIAcl.vue, <a-tooltip> is replaced with <NcTooltip>, enhancing the consistency and formatting of tooltip content. Concurrently, the ModelRoleVisibility.ts file receives a functional adjustment where context.base_id replaces insertObj.base_id in caching operations, likely to improve accuracy or relevance.

Changes

Files Change Summary
packages/nc-gui/components/dashboard/settings/UIAcl.vue Replaced <a-tooltip> with <NcTooltip> for better tooltip rendering and corrected text formatting.
packages/nocodb/src/models/ModelRoleVisibility.ts Replaced insertObj.base_id with context.base_id for appending to the cache, improving caching logic.

Tip

AI model upgrade

gpt-4o model for reviews and chat is now live

OpenAI claims that this model is better at understanding and generating code than the previous models. Please join our Discord Community to provide any feedback or to report any issues.


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 testing code 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 testing code 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 testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @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.
  • Please see the configuration documentation for more information.
  • 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/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between f1aab63 and a098efa.

Files selected for processing (2)
  • packages/nc-gui/components/dashboard/settings/UIAcl.vue (2 hunks)
  • packages/nocodb/src/models/ModelRoleVisibility.ts (1 hunks)
Files skipped from review due to trivial changes (1)
  • packages/nocodb/src/models/ModelRoleVisibility.ts
Additional comments not posted (3)
packages/nc-gui/components/dashboard/settings/UIAcl.vue (3)

247-247: Ensure correct closing of <NcTooltip>.

The closing tag of <NcTooltip> must match the opening tag. Verify that the component is correctly closed and that there are no syntax errors.

Verification successful

Ensure correct closing of <NcTooltip>.

The NcTooltip component is correctly closed in multiple instances throughout the codebase, indicating proper usage.

  • Verified instances of NcTooltip being correctly closed in various .vue files.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the correct closing of the `NcTooltip` component.

# Test: Search for the usage of the `NcTooltip` component to ensure it is correctly closed.
rg --type vue 'NcTooltip'

Length of output: 53



Script:

#!/bin/bash
# Description: Verify the correct closing of the `NcTooltip` component.

# Find all .vue files and search for the usage of the `NcTooltip` component to ensure it is correctly closed.
fd -e vue -x rg 'NcTooltip' {}

Length of output: 15523


230-230: Ensure correct usage of <NcTooltip>.

The <NcTooltip> component replaces <a-tooltip>. Ensure that <NcTooltip> is correctly implemented and that its props and slots are properly utilized. Confirm that this component is imported and registered correctly.

Verification successful

Ensure correct usage of <NcTooltip>.

The <NcTooltip> component is implemented and imported correctly from ~/components/nc/Tooltip.vue. The component is defined with various props and slots, and it is used throughout the codebase. The changes replacing <a-tooltip> with <NcTooltip> appear to be correctly handled.

  • packages/nc-gui/components/dashboard/settings/UIAcl.vue line 230
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the implementation and registration of the `NcTooltip` component.

# Test: Search for the `NcTooltip` component definition to ensure it is correctly implemented and imported.
rg --type vue 'NcTooltip'

Length of output: 53



Script:

#!/bin/bash
# Description: Verify the implementation and registration of the `NcTooltip` component.

# Find all .vue files and search for the NcTooltip component definition and imports.
fd -e vue -x rg 'NcTooltip' {}

Length of output: 15523



Script:

#!/bin/bash
# Description: Display the content of the `NcTooltip` component to verify its implementation.

# Find the file `Tooltip.vue` within the `components/nc` directory and display its content.
fd -e vue 'Tooltip.vue' | xargs cat

Length of output: 6904


237-237: Verify text formatting within <NcTooltip>.

The text formatting within the <NcTooltip> has been updated. Ensure that the new formatting is correct and maintains readability.

Verification successful

Verify text formatting within <NcTooltip>.

The text formatting within the <NcTooltip> component in UIAcl.vue appears correct and maintains readability as expected.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the text formatting within the `NcTooltip` component.

# Test: Search for the usage of the `NcTooltip` component to ensure the text formatting is correct.
rg --type vue 'NcTooltip'

Length of output: 53



Script:

#!/bin/bash
# Description: Verify the text formatting within the `NcTooltip` component.

# Find all .vue files and search for the usage of the `NcTooltip` component within those files
fd -e vue -x rg 'NcTooltip' {}

Length of output: 15523



Script:

#!/bin/bash
# Description: Verify the text formatting within the `NcTooltip` component in the `UIAcl.vue` file.

# Search for the specific line containing the updated text formatting in the `UIAcl.vue` file
fd -e vue -g 'UIAcl.vue' -x rg ">{{ \$t\('labels\.clickToHide'\) }} '{{ record\.title }}' {{ \$t\('labels\.forRole'\) }}:{{ role }}" {}

Length of output: 335



Script:

#!/bin/bash
# Description: Verify the text formatting within the `NcTooltip` component in the `UIAcl.vue` file.

# Search for the specific line containing the updated text formatting in the `UIAcl.vue` file
fd -e vue -g 'UIAcl.vue' -x rg "clickToHide.*record\.title.*forRole.*role" {}

Length of output: 192

Copy link
Contributor
github-actions bot commented Jul 3, 2024

Uffizzi Preview deployment-53777 was deleted.

@dstala dstala merged commit 87d1cc4 into develop Jul 3, 2024
23 checks passed
@dstala dstala deleted the nc-role-visibilty branch July 3, 2024 09:56
@coderabbitai coderabbitai bot mentioned this pull request Nov 15, 2024
7 tasks
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.

🐛 Bug: UI ACL changes are not saved
3 participants
0