superset icon indicating copy to clipboard operation
superset copied to clipboard

Data Misalignment When Applying Filter

Open Dinesh2019 opened this issue 1 year ago • 5 comments
trafficstars

Bug description

When we apply the filter the data in the line-list where individual or beneficiary is displayed is hiding or not applied properly according to the count of the beneficiary.

How to reproduce the bug

1.Login to superset 2.create the linelist report 3.apply the filter which as lesser data

Expected result : data should be aligned properly and user should view the data. Actual result : data is hiding and difficult to access for the user.

Screenshots/recordings

https://github.com/apache/superset/assets/127730126/dbefa7fa-7b3f-41ef-b08f-8924373b4df2

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Firefox

Additional context

No response

Checklist

  • [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Dinesh2019 avatar Jun 20 '24 05:06 Dinesh2019

Hey @Dinesh2019! 👋 I'm here to help you with any bugs, questions, or contributions you have for the project. Let's work together to resolve any issues you're experiencing.

The data misalignment issue when applying filters in line-list reports could be related to recent changes in the dependencies or styles used by Superset. Specifically, the removal of the Filter Box code and the filters set feature might be affecting how filtered data is rendered [1][2][3].

Additionally, recent changes in the Styles.js file could impact the layout and alignment of data. These changes include adjustments to the positioning, borders, padding, font sizes, and colors of table elements [4].

To address this issue, you can try the following steps:

  1. Revert Positioning Changes:

    • Ensure the position property for table elements is set correctly. For example:
      position: 'relative'; // or 'inherit' based on the previous state
      
  2. Adjust Borders and Padding:

    • Modify or remove the border and padding properties if they are causing misalignment. For example:
      border-bottom: none; // or adjust the border value
      padding: 0; // or set to a different value
      
  3. Font and Color Adjustments:

    • Revert font sizes, weights, and colors to their previous values if the new ones are causing issues. For example:
      font-size: '14px'; // or the previous size
      color: '#000'; // or the previous color
      

Here is an example of how you might adjust the Styles.js file:

export const Styles = styled.div`
  ${({ theme, isDashboardEditMode }) => css`
    table.pvtTable {
      position: 'relative'; // Revert to previous value
      width: calc(100% - ${theme.gridUnit}px);
      font-size: '14px'; // Revert to previous size
      text-align: left;
      margin: ${theme.gridUnit}px;
      border-collapse: separate;
      font-family: ${theme.typography.families.sansSerif};
      line-height: 1.4;
    }

    table thead {
      position: 'relative'; // Revert to previous value
      top: 0;
    }

    table tbody tr {
      font-feature-settings: 'tnum' 1;
    }

    table.pvtTable thead tr th,
    table.pvtTable tbody tr th {
      background-color: ${theme.colors.grayscale.light5};
      border-top: none; // Adjust border
      border-left: none; // Adjust border
      font-size: '14px'; // Revert to previous size
      padding: 0; // Adjust padding
      font-weight: ${theme.typography.weights.normal};
    }

    table.pvtTable tbody tr.pvtRowTotals {
      position: 'relative'; // Revert to previous value
      bottom: 0;
    }

    // Other styles remain unchanged
  `}
`;

Adjust the values as needed based on the specific issues you are encountering.

To continue talking to Dosu, mention @dosu.

dosubot[bot] avatar Jun 20 '24 05:06 dosubot[bot]

Hello, i can work on this. Please assign it to me.

gagan-bhullar-tech avatar Jun 23 '24 20:06 gagan-bhullar-tech

Hello, i can work on this. Please assign it to me.

Done! Thanks for volunteering. We're not hung up on the assignments around here... please feel free to open a PR for any open issue you'd like :D

rusackas avatar Jun 24 '24 17:06 rusackas

@Dinesh2019 Unable to reproduce the issue. Can you please provide specific steps with the test datasets.

gagan-bhullar-tech avatar Jun 26 '24 01:06 gagan-bhullar-tech

@gagan-bhullar-tech i think we cant provide me the datasets.

Dinesh2019 avatar Jun 26 '24 07:06 Dinesh2019

I'm not sure I understand the issue here... and this has been silent for upward of 9 months with no repro steps or (even fake) sample data. If you are still facing this in 4.1.1 or newer, and can give us better steps/details, we can certainly reopen this.

rusackas avatar Mar 30 '25 04:03 rusackas