-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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: New query button does not show up issue fixed #36766
Conversation
WalkthroughThe changes introduce a new test suite for the Changes
Suggested labels
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this 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
🧹 Outside diff range and nitpick comments (1)
app/client/src/ce/hooks/hooks.test.ts (1)
8-24
: Wonderful test cases, class!Your test cases are like well-crafted exam questions, covering different scenarios for the
useEditorType
function. Here's a gold star for your efforts!However, to make your tests even better, consider this small improvement:
Add a test case for the
BUILDER_PATH_PREFIX
constant. This will ensure complete coverage of all possible path prefixes. Here's an example:it('should return "app" for BUILDER_PATH_PREFIX', () => { const result = useEditorType(BUILDER_PATH_PREFIX); expect(result).toBe(EditorNames.APPLICATION); });Don't forget to import
BUILDER_PATH_PREFIX
at the top of your file!
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (2)
- app/client/src/ce/hooks/hooks.test.ts (1 hunks)
- app/client/src/ce/hooks/index.ts (1 hunks)
🧰 Additional context used
🔇 Additional comments (3)
app/client/src/ce/hooks/hooks.test.ts (2)
1-5
: Well done on your imports, class!You've correctly imported the necessary functions and constants for your test suite. It's like you've gathered all the right ingredients before starting to cook!
7-7
: Excellent test suite structure, students!Your test suite is well-organized, just like a neatly arranged classroom. The
describe
block clearly indicates that we're testing theuseEditorType
function. Keep up the good work!app/client/src/ce/hooks/index.ts (1)
18-18
: Class, let's examine this new addition to our code!The addition of
BUILDER_BASE_PATH_DEPRECATED
to theeditorType
object looks correct and consistent with the existing structure. Well done!However, I have a few questions for you to ponder:
- What's our plan for phasing out this deprecated path?
- Have we documented this deprecation for other developers?
Remember, clear communication is key in coding, just as it is in the classroom. Consider adding a comment explaining why this deprecated path is necessary and when we plan to remove it.
Let's check if this deprecated path is used elsewhere in our codebase:
✅ Verification successful
Alright class, our initial search didn’t go as planned, but no worries! Let’s try locating
BUILDER_BASE_PATH_DEPRECATED
by directly targeting TypeScript file extensions. This should help us find any other usages in our codebase.
Excellent addition of the deprecated path! 🎉
I've confirmed that
BUILDER_BASE_PATH_DEPRECATED
is used in:
app/client/src/ce/constants/routes/appRoutes.ts
app/client/src/ce/hooks/index.ts
app/client/src/ce/hooks/hooks.test.ts
Everything looks good! Please ensure we document this deprecation and outline our plan for transitioning away from it.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Search for usage of BUILDER_BASE_PATH_DEPRECATED # Test: Look for other occurrences of BUILDER_BASE_PATH_DEPRECATED rg --type typescript "BUILDER_BASE_PATH_DEPRECATED"Length of output: 86
Script:
#!/bin/bash # Description: Search for usage of BUILDER_BASE_PATH_DEPRECATED in TypeScript files rg "BUILDER_BASE_PATH_DEPRECATED" --glob "*.ts" --glob "*.tsx"Length of output: 710
/build-deploy-preview skip-tests=true |
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/11248890050. |
Deploy-Preview-URL: https://ce-36766.dp.appsmith.com |
Description
This PR fixes two issues:
/applications
(older url) as opposed to/app
(newer slug based url). This results in new query button not showing up on datasource view page, because new query button is hidden behind a condition of editorType and editorType was depending on the new url path. This PR fixes the issue by adding support for older path as well to provide backwards compatibility.Fixes #35626
or
Fixes
Issue URL
Warning
If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.
Automation
/ok-to-test tags="@tag.Sanity"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/11240765031
Commit: 015ef2a
Cypress dashboard.
Tags:
@tag.Sanity
Spec:
Tue, 08 Oct 2024 18:19:47 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?