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

[Task]: Add no access state for the Datasource tab on the Bottom pane #38093

Closed
ankitakinger opened this issue Dec 11, 2024 · 0 comments · Fixed by #38268
Closed

[Task]: Add no access state for the Datasource tab on the Bottom pane #38093

ankitakinger opened this issue Dec 11, 2024 · 0 comments · Fixed by #38268
Assignees
Labels
IDE Pod Issues that new developers face while exploring the IDE IDE Product Issues related to the IDE Product Task A simple Todo

Comments

@ankitakinger
Copy link
Contributor

ankitakinger commented Dec 11, 2024

Screenshot 2024-12-06 at 14 55 26

@ankitakinger ankitakinger added IDE Product Issues related to the IDE Product Task A simple Todo IDE Pod Issues that new developers face while exploring the IDE labels Dec 11, 2024
@ankitakinger ankitakinger self-assigned this Dec 11, 2024
ankitakinger added a commit that referenced this issue Dec 23, 2024
… given via GAC (#38268)

## Description

- Today, when a user gives only View/Edit access to a Datasource, the
schema tables are still being seen on the Datasource tabs while it
doesn't show on the Datasource Editor page. This has been fixed with
this PR. It should only be seen when Datasource has create action
permissions, hence we show the "We can’t show the schema for this
datasource" screen in this case.
- When the user has not given View access to a Datasource, the UI is
broken in Datasource tab. This has been fixed with this PR. We now show
the No access state in this case.

**BEFORE**:

When view access is not given:
<img width="1147" alt="Screenshot 2024-12-20 at 5 52 58 PM"
src="https://github.com/user-attachments/assets/c1d1fd39-d6d3-4fd8-99bf-895698f61490"
/>

When create action permission is not given but view access is given:
<img width="1138" alt="Screenshot 2024-12-20 at 5 54 10 PM"
src="https://github.com/user-attachments/assets/abf0aa86-e541-4453-b7e4-071d123f7a60"
/>


**AFTER**:

When view access is not given:
<img width="1136" alt="Screenshot 2024-12-20 at 5 58 22 PM"
src="https://github.com/user-attachments/assets/e160250b-963c-457e-81b1-380aef1332a1"
/>


When create action permission is not given but view access is given:
<img width="1139" alt="Screenshot 2024-12-20 at 5 57 53 PM"
src="https://github.com/user-attachments/assets/1967a657-622c-46f7-b6d4-78451b6106f0"
/>


Fixes [#38093](#38093)

## Automation

/ok-to-test tags="@tag.Sanity, @tag.Datasource, @tag.IDE, @tag.JS,
@tag.Git"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/12452839374>
> Commit: ee5bc17
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12452839374&attempt=3"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity, @tag.Datasource, @tag.IDE, @tag.JS, @tag.Git`
> Spec:
> <hr>Mon, 23 Dec 2024 08:29:06 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced new icons and improved conditional rendering for datasource
components.
  - Added a "not found" message for empty datasource options.
  - Enhanced user feedback with clearer messaging for missing resources.

- **Bug Fixes**
- Adjusted rendering logic to ensure edit buttons only appear when both
conditions are met.

- **Enhancements**
- Improved permission checks and logic for managing datasource
visibility.
- Streamlined component logic for better readability and
maintainability.
  - Enhanced error handling practices in saga functions.

- **Tests**
  - Simplified test structure by removing unnecessary context providers.

- **Chores**
  - Updated import statements and component names for consistency.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
NandanAnantharamu pushed a commit that referenced this issue Dec 27, 2024
… given via GAC (#38268)

## Description

- Today, when a user gives only View/Edit access to a Datasource, the
schema tables are still being seen on the Datasource tabs while it
doesn't show on the Datasource Editor page. This has been fixed with
this PR. It should only be seen when Datasource has create action
permissions, hence we show the "We can’t show the schema for this
datasource" screen in this case.
- When the user has not given View access to a Datasource, the UI is
broken in Datasource tab. This has been fixed with this PR. We now show
the No access state in this case.

**BEFORE**:

When view access is not given:
<img width="1147" alt="Screenshot 2024-12-20 at 5 52 58 PM"
src="https://github.com/user-attachments/assets/c1d1fd39-d6d3-4fd8-99bf-895698f61490"
/>

When create action permission is not given but view access is given:
<img width="1138" alt="Screenshot 2024-12-20 at 5 54 10 PM"
src="https://github.com/user-attachments/assets/abf0aa86-e541-4453-b7e4-071d123f7a60"
/>


**AFTER**:

When view access is not given:
<img width="1136" alt="Screenshot 2024-12-20 at 5 58 22 PM"
src="https://github.com/user-attachments/assets/e160250b-963c-457e-81b1-380aef1332a1"
/>


When create action permission is not given but view access is given:
<img width="1139" alt="Screenshot 2024-12-20 at 5 57 53 PM"
src="https://github.com/user-attachments/assets/1967a657-622c-46f7-b6d4-78451b6106f0"
/>


Fixes [#38093](#38093)

## Automation

/ok-to-test tags="@tag.Sanity, @tag.Datasource, @tag.IDE, @tag.JS,
@tag.Git"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/12452839374>
> Commit: ee5bc17
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12452839374&attempt=3"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity, @tag.Datasource, @tag.IDE, @tag.JS, @tag.Git`
> Spec:
> <hr>Mon, 23 Dec 2024 08:29:06 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced new icons and improved conditional rendering for datasource
components.
  - Added a "not found" message for empty datasource options.
  - Enhanced user feedback with clearer messaging for missing resources.

- **Bug Fixes**
- Adjusted rendering logic to ensure edit buttons only appear when both
conditions are met.

- **Enhancements**
- Improved permission checks and logic for managing datasource
visibility.
- Streamlined component logic for better readability and
maintainability.
  - Enhanced error handling practices in saga functions.

- **Tests**
  - Simplified test structure by removing unnecessary context providers.

- **Chores**
  - Updated import statements and component names for consistency.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IDE Pod Issues that new developers face while exploring the IDE IDE Product Issues related to the IDE Product Task A simple Todo
Projects
None yet
1 participant