GoodDollar / GoodCollective

Monorepo for GoodCollective (Segmented UBI and Direct Payments Pool)
MIT License
3 stars 1 forks source link

[Design QA] View Collective page/ Mobile - Padding / Gap #35

Closed SanaJamm closed 8 months ago

SanaJamm commented 9 months ago

There’s a gap (the grey area) between the image and the text section, please delete it.

devs:

Screen Shot 2023-11-14 at 13 14 25

design:

Screen Shot 2023-11-15 at 11 53 43
benefacto commented 9 months ago

Technical Implementation

To remove the gap between the image and the text section in the ViewCollective component on mobile screens, you should adjust the relevant styles in your stylesheet. This gap is likely caused by either margin or padding settings in the styles for the image or the text container. Here's how to adjust the code:

  1. Identify the Elements Creating the Gap: The gap is likely between the image and the collectiveInformation elements. Examine these styles to identify any margins or paddings that might be creating the gap.

  2. Adjust Image Style: If the image style has a marginBottom or the collectiveInformation style has a marginTop, these could be creating the gap. Set them to 0 or reduce them as needed.

    image: {
     width: '100%',
     height: 192,
     marginBottom: 0, // Set marginBottom to 0 or reduce it
    },
  3. Adjust Collective Information Style: Similarly, adjust the style for the collectiveInformation element:

    collectiveInformation: {
     flex: 1,
     flexDirection: 'row',
     gap: 8,
     marginTop: 0, // Set marginTop to 0 or reduce it
    },
  4. Check for Additional Padding or Margin: There might be additional padding or margin applied to the parent container or within the collectiveDetailsMobile or collectiveDesktopData styles. Check these and adjust as necessary.

  5. Test on Mobile Screen: After making these changes, test your application on a mobile screen to ensure the gap is removed and the layout appears as expected.

  6. Ensure Responsiveness: Ensure that these changes don't adversely affect the layout on larger screens or desktop resolution. You might need to use media queries or platform-specific styles if the layout significantly differs between mobile and desktop.

By following these steps, you should be able to remove the unwanted gap between the image and the text section on mobile screens in your ViewCollective component. Remember to test on various screen sizes to ensure the changes work across different devices.

Estimate

Addressing the layout issue of removing the gap between the image and the text section in the ViewCollective component on mobile screens involves targeted CSS adjustments. This task is focused on modifying the existing styles related to margins and paddings.

  1. Identifying the Elements Creating the Gap (1 hour):

    • Examining the styles for the image and collectiveInformation elements to identify margins or paddings causing the gap.
  2. Adjusting Image Style (1-2 hours):

    • Modifying the image style to eliminate or reduce any marginBottom setting that contributes to the gap.
  3. Adjusting Collective Information Style (1-2 hours):

    • Similarly, adjusting the collectiveInformation style, particularly focusing on the marginTop, to reduce or remove the gap.
  4. Checking Additional Padding or Margin (1-2 hours):

    • Inspecting other related styles, such as in the parent container or within collectiveDetailsMobile or collectiveDesktopData, for any additional padding or margin that might affect the layout.
  5. Testing on Mobile Screen (1-2 hours):

    • Testing the adjustments on a mobile screen to ensure the gap is effectively removed and the layout appears as expected.
  6. Ensuring Responsiveness (1-2 hours):

    • Verifying that the changes don't adversely affect the layout on larger screens or desktop resolutions.
    • Potentially using media queries or platform-specific styles for different screen sizes to maintain an optimal layout across devices.
  7. Review and Refinement (1 hour):

    • Addressing any feedback and making necessary refinements.

Adding these up, the total estimated time could be around 7-11 hours. This estimate assumes that the developer is familiar with responsive web design and the specificities of the application's CSS framework or style conventions.

vldkhh commented 8 months ago

verified on web and mobile