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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: hide navigation by default for anvil #33550

Merged
merged 2 commits into from
May 17, 2024

Conversation

jsartisan
Copy link
Contributor

@jsartisan jsartisan commented May 17, 2024

Fixes #33436

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

Tip

馃煝 馃煝 馃煝 All cypress tests have passed! 馃帀 馃帀 馃帀
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9128689128
Commit: 2981e78
Cypress dashboard url: Click here!

Copy link
Contributor

coderabbitai bot commented May 17, 2024

Walkthrough

Walkthrough

The recent updates introduce a new optional showNavbar property to the CreateApplicationRequest interface in the ApplicationApi.tsx file. This property allows conditional setting of the navigationSetting in the createApplication method. Additionally, the createApplicationSaga function in ApplicationSagas.tsx now includes logic to handle Anvil experimentation, setting the layout system type to Anvil and hiding the navbar if Anvil is enabled for the user.

Changes

Files Change Summary
app/client/src/ce/api/ApplicationApi.tsx Added showNavbar property to CreateApplicationRequest and updated createApplication method accordingly.
app/client/src/ce/sagas/ApplicationSagas.tsx Updated createApplicationSaga to set request.showNavbar = false for Anvil experimentation.

Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between bbfe4ff and 2981e78.
Files selected for processing (2)
  • app/client/src/ce/api/ApplicationApi.tsx (2 hunks)
  • app/client/src/ce/sagas/ApplicationSagas.tsx (1 hunks)
Additional comments not posted (3)
app/client/src/ce/api/ApplicationApi.tsx (2)

95-95: Added showNavbar property to CreateApplicationRequest interface aligns with PR objectives.


344-354: The conditional handling of showNavbar in createApplication method is correctly implemented.

Verification successful

The verification process has confirmed that the showNavbar property is being handled in the front-end code. Here are the relevant findings:

  • File: app/client/src/ce/selectors/applicationSelectors.tsx
    • navigationSetting?.showNavbar !== false &&
  • File: app/client/src/ce/sagas/ApplicationSagas.tsx
    • request.showNavbar = false;
  • File: app/client/src/ce/api/ApplicationApi.tsx
    • showNavbar?: boolean;
    • if (request.showNavbar !== undefined) {
    • showNavbar: request.showNavbar,

These instances indicate that the showNavbar property is being utilized correctly in the front-end components.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the integration of `showNavbar` property in the front-end.

# Test: Search for the usage of `createApplication` method in front-end components. Expect: Proper handling of `showNavbar`.
rg --type typescript $'createApplication'

Length of output: 75



Script:

#!/bin/bash
# Description: Verify the integration of `showNavbar` property in the front-end.

# Find all TypeScript files and search for the usage of `createApplication` method in front-end components.
fd -e ts -e tsx -x rg 'createApplication' {}

Length of output: 1072



Script:

#!/bin/bash
# Description: Verify the handling of `showNavbar` property in the front-end.

# Find all TypeScript files and search for the usage of `showNavbar` in the context of `createApplication`.
fd -e ts -e tsx -x rg 'createApplication' {} | xargs -I {} rg 'showNavbar' {}

Length of output: 1801



Script:

#!/bin/bash
# Description: Verify the handling of `showNavbar` property in the front-end.

# Step 1: Find all TypeScript files containing the usage of `createApplication`.
files=$(fd -e ts -e tsx -x rg -l 'createApplication' {})

# Step 2: Search for the usage of `showNavbar` within those files.
for file in $files; do
  rg 'showNavbar' "$file"
done

Length of output: 1492

app/client/src/ce/sagas/ApplicationSagas.tsx (1)

550-557: The handling of Anvil settings in createApplicationSaga is correctly implemented. Ensure Anvil settings are correctly applied when enabled.


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.
  • 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.

@github-actions github-actions bot added Anvil POD Issue related to Anvil project Anvil team issues related to the new layout system anvil High This issue blocks a user from building or impacts a lot of users Task A simple Todo WDS team skip-changelog Adding this label to a PR prevents it from being listed in the changelog labels May 17, 2024
@jsartisan
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

Copy link

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

@jsartisan jsartisan requested review from riodeuno and KelvinOm and removed request for ayushpahwa May 17, 2024 11:30
Copy link

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

@jsartisan jsartisan added the ok-to-test Required label for CI label May 17, 2024
@jsartisan jsartisan enabled auto-merge (squash) May 17, 2024 11:43
@jsartisan jsartisan added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels May 17, 2024
@jsartisan
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

Copy link

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

Copy link

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

@jsartisan
Copy link
Contributor Author

@KelvinOm can you try the DP if the PR has what we wanted?

@jsartisan jsartisan merged commit 8441311 into release May 17, 2024
42 checks passed
@jsartisan jsartisan deleted the chore/hide-navigation-anvil branch May 17, 2024 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Anvil POD Issue related to Anvil project Anvil team issues related to the new layout system anvil High This issue blocks a user from building or impacts a lot of users ok-to-test Required label for CI skip-changelog Adding this label to a PR prevents it from being listed in the changelog Task A simple Todo WDS team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Turn off navigation by default for Anvil
2 participants