appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

fix:Table filter floats with page scroll (#34287)

Open Harshithazemoso opened this issue 1 year ago • 13 comments

Description

[!TIP]
Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team).

Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR.

Fixes #34287
or
Fixes https://github.com/appsmithorg/appsmith/issues/34287

[!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=""

:mag: Cypress test results

[!CAUTION]
If you modify the content in this section, you are likely to disrupt the CI result for your PR.

Communication

Should the DevRel and Marketing teams inform users about this change?

  • [ ] Yes
  • [ ] No

VIDEO VIDEO:SHOWING FIXING THE BUG

Summary by CodeRabbit

  • New Features

    • Enhanced overflow management for the filter pane in the editor, improving responsiveness.
    • Improved dropdown behavior with new properties for better visibility within the viewport.
  • Bug Fixes

    • Adjusted dropdown configuration to prevent overflow issues, ensuring consistent user experience.

Harshithazemoso avatar Jul 25 '24 16:07 Harshithazemoso

Walkthrough

The recent changes enhance the functionality and usability of the Popper and CustomizedDropdown components. The Popper component introduces a new modifier to improve layout management and overflow behavior, while the CustomizedDropdown updates its overflow handling and introduces a usePortal prop. These modifications collectively aim to refine user experience and visual consistency across the application.

Changes

Files Change Summary
app/client/src/pages/Editor/Popper.tsx Added escapeWithReference: true to modifiers, improving overflow behavior and layout management.
app/client/src/pages/common/CustomizedDropdown/index.tsx Updated modifiers to disable preventOverflow and set boundariesElement to "viewport". Introduced usePortal prop set to false, enhancing dropdown behavior and visibility.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Popper
    participant CustomizedDropdown

    User->>Popper: Trigger component
    Popper->>Popper: Check overflow
    Popper->>User: Display layout with overflow handling

    User->>CustomizedDropdown: Open dropdown
    CustomizedDropdown->>CustomizedDropdown: Adjust visibility within viewport
    CustomizedDropdown->>User: Show dropdown

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.

coderabbitai[bot] avatar Jul 25 '24 16:07 coderabbitai[bot]

@Harshithazemoso Please can you add jest tests for your changes?

jacquesikot avatar Jul 31 '24 04:07 jacquesikot

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

github-actions[bot] avatar Aug 07 '24 16:08 github-actions[bot]

@Harshithazemoso Please can you add jest tests for your changes?

sure @jacquesikot,

Harshithazemoso avatar Aug 08 '24 04:08 Harshithazemoso

Hello @jacquesikot,

I have implemented changes that allow the filter popper and dropdowns to scroll along with the table component. Could you please provide your insights on how we can reflect this behavior in a Jest test case? or could we just write the test for the existiance of the added modifiers for the Popper for fixing the bug . Can I proceed with this approach? Please suggest. Thank you

Harshithazemoso avatar Aug 09 '24 07:08 Harshithazemoso

@Harshithazemoso Sorry for the late reply, I think it will be better in a cypress test case not jest

jacquesikot avatar Aug 09 '24 11:08 jacquesikot

@Harshithazemoso Sorry for the late reply, I think it will be better in a cypress test case not jest

hello @jacquesikot Thanks for the reply I have attempted to implement a Cypress test to ensure that the table widget scrolls below the fold, along with the filter and dropdowns, when the user scrolls the page. The objective is to position the table widget at a y-coordinate of 1500. To achieve this, I have explored several methods, including:

Utilizing event listeners to move the table to the desired position. Using drag-and-drop functionality to relocate the table. Adding additional widgets to the page to enable scrolling. Despite these efforts, none of the approaches have successfully achieved the desired outcome. can you suggest any method to ensure that the table widget can be scrolled into view at the specified position, thereby enabling the necessary page scrolling.

Thank you

Harshithazemoso avatar Aug 09 '24 12:08 Harshithazemoso

@sagar-qa007 Can you assist here?

jacquesikot avatar Aug 14 '24 07:08 jacquesikot

@jacquesikot As I read comments from @Harshithazemoso . It is UI/UX behaviour for user. It is recommended here to test UI behaviour for common functions like scroll. We can write cypress test case here to check it. Just check for any existing test case which has case for this component or behaviour and we can update that test case in this PR.

sagar-qa007 avatar Aug 14 '24 07:08 sagar-qa007

@Harshithazemoso then can we please atleast add one test case to check your function usage?

sagar-qa007 avatar Aug 14 '24 14:08 sagar-qa007

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

github-actions[bot] avatar Aug 26 '24 16:08 github-actions[bot]

Hey @Harshithazemoso are you still interested in fixing this?

jacquesikot avatar Aug 28 '24 10:08 jacquesikot

Hey @Harshithazemoso are you still interested in fixing this?

Yes @jacquesikot

Harshithazemoso avatar Aug 28 '24 10:08 Harshithazemoso

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

github-actions[bot] avatar Feb 05 '25 16:02 github-actions[bot]

This PR has been closed because of inactivity.

github-actions[bot] avatar Mar 10 '25 16:03 github-actions[bot]