DickinsonCollege / FD2School-FarmData2-S23

A fork of FarmData2 that is used for the FarmData2 School Activities.
Other
1 stars 36 forks source link

Seeding Report: Some columns not appearing #230

Open braughtg opened 1 year ago

braughtg commented 1 year ago

When generating the Seeding Report sub-tab in the BarnKit sometimes, some columns that are supposed to appear in the table are not appearing in the table (e.g. Row Feet, Hours). When this happens it is causing Cypress tests being written to test the summary table values (e.g. Total Row Feet) to fail because they are unable to get the <td> elements from the table because the column does not appear. This may impact work on Issues #206, #207, #186. Those working on issues affected by this bug should request guidance by commenting on their issue.

This is a known bug in the FarmData2 application that is open for work. Please DickinsonCollege/FarmData2#592 for additional information.

You may choose to work on this issue either in this repository or you may Fork/Clone the main FarmData2 repository and work there.

Shahir-47 commented 1 year ago

I've tried finding the window height and width in the console in developer tools and got this: image

The code in seedingReports.html is the following: if (window.screen.width < 900 || window.screen.height < 900) { this.isMobile = true }

It seems to me that the function is working the way it is supposed to be. Will changing the conditions be a good idea because it seems to me that the Firefox browser on Windows always displays in lower resolution. If the goal is to figure out if the host machine is a mobile or not, there are some javascript function to determine if the end user is using a mobile specific browser or not. Please let me know @braughtg on how should proceed with this.

Shahir-47 commented 1 year ago

I tried finding the width and height of the web page in the Google Chrome browser in my own OS (NOT in the Linux OS in vnc) and got this:

image

My own OS has the following dimensions: image

As I mentioned earlier if the purpose is to find the dimension of the host machine, I would suggest testing something other than the window size.

braughtg commented 1 year ago

As I mentioned earlier if the purpose is to find the dimension of the host machine, I would suggest testing something other than the window size.

@Shahir-47 Thanks for looking into this. I agree. The window size seems to be unreliable across browsers.

My current thinking on this is that we may want to investigate the use of the Bootstrap Breakpoint classes. There is a little more information on these classes in DickinsonCollege/FarmData2#592.