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

fix: bottom bar issue with multienv #32249

Merged
merged 1 commit into from
Apr 1, 2024
Merged

Conversation

brayn003
Copy link
Contributor

@brayn003 brayn003 commented Mar 29, 2024

Description

Multi env disappearing from bottom bar in editor mode

Fixes #31266 #32270

Automation

/ok-to-test tags="@tag.MultiEnv"

🔍 Cypress test results

Important

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/8506755504
Commit: 2a72270e1d2eee93391bdb098f3bb708c0bb5a8e
Cypress dashboard url: Click here!
All cypress tests have passed 🎉🎉🎉

Summary by CodeRabbit

  • New Features
    • Enhanced environment switching functionality to support multiple environments based on various conditions including view and preview modes.
  • Refactor
    • Simplified the bottom bar display logic across the app using the updated useShowEnvSwitcher hook.
    • Revised environment and feature flag handling in the App Viewer and Editor IDE components for improved clarity and efficiency.
    • Updated EditorWrapperContainer to adjust its height dynamically based on the presence of the bottom bar.

@github-actions github-actions bot added Query & JS Pod Issues related to the query & JS Pod Bug Something isn't working Community Reported issues reported by community members Data Platform Pod Issues related to the underlying data platform Environments Product Issues related to datasource environments Git Platform Issues related to the git & the app platform Git Product Issues related to version control product Medium Issues that frustrate users due to poor UX Production QA Needs QA attention QA Pod Issues under the QA Pod labels Mar 29, 2024
@brayn003 brayn003 self-assigned this Mar 29, 2024
@brayn003 brayn003 added the ok-to-test Required label for CI label Mar 29, 2024
@brayn003 brayn003 marked this pull request as ready for review April 1, 2024 09:55
@brayn003 brayn003 requested review from a team and sbalaji1192 and removed request for a team April 1, 2024 09:55
Copy link
Contributor

coderabbitai bot commented Apr 1, 2024

Walkthrough

Walkthrough

The recent updates focus on enhancing the environment switching functionality within the application. The useShowEnvSwitcher hook has been refined to support multiple environments, streamlining the conditions for environment switching based on various modes and feature flags. Additionally, the application's interface has been simplified, particularly in how the bottom bar is displayed, by centralizing the logic within the useShowEnvSwitcher hook. These changes aim to address bugs and improve the user experience in environment selection and visibility.

Changes

File Path Change Summary
.../src/ce/hooks/useShowEnvSwitcher.ts Updated to check for multiple environments based on conditions.
.../src/pages/AppViewer/index.tsx
.../src/pages/Editor/IDE/index.tsx
Integrated useShowEnvSwitcher for environment switching logic. Simplified bottom bar display logic.
.../src/pages/Editor/commons/EditorWrapperContainer.tsx Added hasBottomBar prop for dynamic height adjustment based on bottom bar presence.

Assessment against linked issues

Objective Addressed Explanation
Ensure environment selector visibility in view mode for users with necessary permissions. (#31266)
Streamline application interface by adjusting or removing the environment switcher as needed. (#30199, #26367)
Address the discrepancy and prevent un-deployed widgets from displaying when switching environments. (#26367) The changes primarily focus on the environment switcher functionality and do not directly address widget visibility issues.

Possibly related 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.

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.

@brayn003 brayn003 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Apr 1, 2024
@brayn003
Copy link
Contributor Author

brayn003 commented Apr 1, 2024

/build-deploy-preview skip-tests=true

Copy link

github-actions bot commented Apr 1, 2024

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/8507097920.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 32249.
recreate: .

Copy link

github-actions bot commented Apr 1, 2024

Deploy-Preview-URL: https://ce-32249.dp.appsmith.com

@brayn003 brayn003 merged commit 7260f5b into release Apr 1, 2024
49 checks passed
@brayn003 brayn003 deleted the fix/multienv-flag-issue branch April 1, 2024 11:15
brayn003 added a commit that referenced this pull request Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Community Reported issues reported by community members Data Platform Pod Issues related to the underlying data platform Environments Product Issues related to datasource environments Git Platform Issues related to the git & the app platform Git Product Issues related to version control product Medium Issues that frustrate users due to poor UX ok-to-test Required label for CI Production QA Pod Issues under the QA Pod QA Needs QA attention Query & JS Pod Issues related to the query & JS Pod
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

[Bug]: Datasource Environment Selector Not Appearing in Deployed Version of App
2 participants