Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

Seeding Report: Responsive Display is not rendered correctly. #238

Open
nathang15 opened this issue May 9, 2023 · 5 comments
Open

Seeding Report: Responsive Display is not rendered correctly. #238

nathang15 opened this issue May 9, 2023 · 5 comments
Assignees

Comments

@nathang15
Copy link

nathang15 commented May 9, 2023

The columns of the Seeding Report are not displayed correctly when changing window size.

When changing the window size, the columns should appear with some columns being omitted to fit the mobile window size.

The images show the report for Seeding Type = "All" but all types of Seeding have this problem.

Here is how the report should look like when window size is mobile:

image

Compare to the current incorrect rendered display:

image

Steps to Reproduce:

  1. Log in as manager or worker
  2. Go to BarnKit tab and select seeding report.
  3. Enter any valid date range.
  4. Changing the window size to be smaller and the problem should appear.

When observe the code snippet in seedingReport.html, we can see that isMobile = true if the following conditions are met:

if (window.screen.width < 900 || window.screen.height < 900) {
    this.isMobile = true
}

And some columns should disappear when isMobile = true:

if(this.isMobile) {
   this.tableColumns[10].visible = false
   this.tableColumns[11].visible = false
   this.tableColumns[12].visible = false
   this.tableColumns[13].visible = false
   this.tableColumns[14].visible = false
}

You can inspect the element to see that the window size met the condition for isMobile to be true but the display does not rendered accordingly.

image

@nathang15 nathang15 changed the title Seeding Report: Responsive Display is not rendered correctly. [bug] [Good Second Issue] Seeding Report: Responsive Display is not rendered correctly. May 9, 2023
@nathang15 nathang15 changed the title [bug] [Good Second Issue] Seeding Report: Responsive Display is not rendered correctly. Seeding Report: Responsive Display is not rendered correctly. May 9, 2023
@nathang15
Copy link
Author

I would like to be assigned this issue.

@braughtg
Copy link
Member

braughtg commented May 9, 2023

This appears to be the same issue as #230 here, which is also in the FarmData2 upstream at:
DickinsonCollege#592

@nathang15
Copy link
Author

I believe this one is different. On my machine, the columns still display fully, and it remains the same when I minimize the window size, just that the report looks cropped out like this:

image

@nathang15
Copy link
Author

I apologize, the issue is the same one as DickinsonCollege#592

@braughtg
Copy link
Member

braughtg commented May 9, 2023

I believe this one is different.

The behavior you report is different, but I think that the root cause is the same. It seems that whatever mechanism is being used to determine the window size is not working as expected. It is manifesting either as columns being hidden when they shouldn't be or not being hidden when they should be. Hopefully there is some other way to find the screen size.

The farmOS application introduces Bootstrap to every page. So there may be a way to solve this issue using the Bootstrap Breakpoints (https://getbootstrap.com/docs/5.0/layout/breakpoints/). Though, I have not investigated that much.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants