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: added margin top to the onboarding flow if banner visible #31497

Merged
merged 4 commits into from
Mar 7, 2024

Conversation

AmanAgarwal041
Copy link
Contributor

@AmanAgarwal041 AmanAgarwal041 commented Mar 5, 2024

Description

Earlier the since the license banner had fixed position which was making the skip section gets hidden. Hence as the page header is positioned 40px below the banner if it is visible. We are doing the same for the onboarding flow.
Screenshot 2024-03-05 at 11 33 47 PM

PR fixes following issue(s)

Fixes #30953

Media

Screen.Recording.2024-03-06.at.6.35.34.PM.mov

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Chore (housekeeping or task changes that don't impact user perception)
  • This change requires a documentation update

Testing

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration.
Delete anything that is not relevant

  • Manual
  • JUnit
  • Jest
  • Cypress

Test Plan

Add Testsmith test cases links that relate to this PR

Issues raised during DP testing

Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR)

Checklist:

Dev activity

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • PR is being merged under a feature flag

QA activity:

  • Speedbreak features have been covered
  • Test plan covers all impacted features and areas of interest
  • Test plan has been peer reviewed by project stakeholders and other QA members
  • Manually tested functionality on DP
  • We had an implementation alignment call with stakeholders post QA Round 2
  • Cypress test cases have been added and approved by SDET/manual QA
  • Added Test Plan Approved label after Cypress tests were reviewed
  • Added Test Plan Approved label after JUnit tests were reviewed

Summary by CodeRabbit

  • New Features
    • Introduced a conditional banner visibility in the application creation interface, enhancing user experience by dynamically adjusting UI layout.

Copy link
Contributor

coderabbitai bot commented Mar 5, 2024

Walkthrough

The recent modification in the CreateNewAppsOption.tsx file primarily introduces a conditional display logic for a license banner based on the shouldShowLicenseBanner selector. This adjustment dynamically alters the top margin within the SectionWrapper component to accommodate the banner's visibility, alongside incorporating a new state isBannerVisible to manage this feature. This change aims to enhance user interface flexibility and responsiveness to licensing conditions.

Changes

File Change Summary
.../src/ce/pages/Applications/CreateNewAppsOption.tsx Added shouldShowLicenseBanner dependency, adjusted SectionWrapper styling, and introduced isBannerVisible state.

Assessment against linked issues

Objective Addressed Explanation
#30953: Visibility of the Skip, I'll do it later option in Start with Data flow The changes in CreateNewAppsOption.tsx relate to the licensing banner's visibility and do not directly address the visibility issue of the Skip, I'll do it later option in the Start with Data flow.

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 Configuration 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 Query & JS Pod Issues related to the query & JS Pod Bug Something isn't working Integrations Product Issues related to a specific integration Medium Issues that frustrate users due to poor UX Needs Triaging Needs attention from maintainers to triage Onboarding Product Issues related to onboarding new developers Production labels Mar 5, 2024
@Nikhil-Nandagopal Nikhil-Nandagopal added Release Low An issue that is neither critical nor breaks a user flow labels Mar 5, 2024
Comment on lines +64 to +71
const SectionWrapper = styled.div<{ isBannerVisible: boolean }>`
display: flex;
flex-direction: column;
padding: 0 var(--ads-v2-spaces-7) var(--ads-v2-spaces-7);
${(props) => `
margin-top: ${props.theme.homePage.header}px;
margin-top: ${
props.theme.homePage.header + (props.isBannerVisible ? 40 : 0)
}px;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dynamic adjustment of the SectionWrapper component's styling based on the isBannerVisible state is well-implemented. Using a styled component to conditionally apply the additional top margin ensures that the layout adapts seamlessly to the presence of the license banner. This approach maintains the separation of concerns by keeping styling logic within the styled component definition. However, consider extracting the calculation of the top margin into a separate function for better readability and maintainability.

+ const calculateTopMargin = (isBannerVisible: boolean) => props.theme.homePage.header + (isBannerVisible ? 40 : 0) + 'px';
- margin-top: ${props.theme.homePage.header + (props.isBannerVisible ? 40 : 0)}px;
+ margin-top: ${calculateTopMargin(props.isBannerVisible)};

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
const SectionWrapper = styled.div<{ isBannerVisible: boolean }>`
display: flex;
flex-direction: column;
padding: 0 var(--ads-v2-spaces-7) var(--ads-v2-spaces-7);
${(props) => `
margin-top: ${props.theme.homePage.header}px;
margin-top: ${
props.theme.homePage.header + (props.isBannerVisible ? 40 : 0)
}px;
const SectionWrapper = styled.div<{ isBannerVisible: boolean }>`
display: flex;
flex-direction: column;
padding: 0 var(--ads-v2-spaces-7) var(--ads-v2-spaces-7);
${(props) => `
+ const calculateTopMargin = (isBannerVisible: boolean) => props.theme.homePage.header + (isBannerVisible ? 40 : 0) + 'px';
- margin-top: ${props.theme.homePage.header + (props.isBannerVisible ? 40 : 0)}px;
+ margin-top: ${calculateTopMargin(props.isBannerVisible)};

@AmanAgarwal041
Copy link
Contributor Author

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

Copy link

github-actions bot commented Mar 5, 2024

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/8160920269.
Workflow: Appsmith External Integration Test Workflow.
Tags: @tag.Datasource.

@AmanAgarwal041
Copy link
Contributor Author

Find the deployed preview for testing on : https://github.com/appsmithorg/appsmith-ee/pull/3657

Copy link

github-actions bot commented Mar 5, 2024

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

sneha122
sneha122 previously approved these changes Mar 6, 2024
@sneha122
Copy link
Contributor

sneha122 commented Mar 6, 2024

/build-deploy-preview skip-tests=true

Copy link

github-actions bot commented Mar 6, 2024

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

Copy link

github-actions bot commented Mar 6, 2024

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

@sneha122
Copy link
Contributor

sneha122 commented Mar 6, 2024

Tested both CE and EE DPs, everything looks good!! @AmanAgarwal041

@AmanAgarwal041
Copy link
Contributor Author

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

Copy link

github-actions bot commented Mar 6, 2024

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/8172596147.
Workflow: Appsmith External Integration Test Workflow.
Tags: @tag.Datasource.

Copy link

github-actions bot commented Mar 6, 2024

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

@sharat87 sharat87 merged commit 6ba2f35 into release Mar 7, 2024
21 checks passed
@sharat87 sharat87 deleted the fix/30953-skip-option-visibility branch March 7, 2024 00:19
@Nikhil-Nandagopal Nikhil-Nandagopal removed the Integrations Product Issues related to a specific integration label Aug 6, 2024
@github-actions github-actions bot added QA Needs QA attention QA Pod Issues under the QA Pod labels Aug 6, 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 Low An issue that is neither critical nor breaks a user flow Medium Issues that frustrate users due to poor UX Needs Triaging Needs attention from maintainers to triage Onboarding Product Issues related to onboarding new developers Production QA Pod Issues under the QA Pod QA Needs QA attention Query & JS Pod Issues related to the query & JS Pod Release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: The Skip, I'll do it later option isn't seen on the Start with Data default flow for few users
4 participants