"Turn screen horizontal for best viewing experience" shows on NON mobile devices.
- Dominant language
- TSQL
- Stars
- 1.9k
- Forks
- 333
- PR merge metrics
- No merged PRs in 30d
Description
See attached screenshot for an image of this. This banner was appearing for us even on laptops. I believe this is occurring due to the code in question here. (line 148 of CSETWebNg/src/app/layout/layout-main/layout-main.component.ts)
if (hasTouchScreen) {
this.isMobile = true;
} else {
this.isMobile = false;
}
if(this.isMobile){
this._snackBar.open('Turn screen horizontal for best viewing experience', "Close", {
verticalPosition: 'top',
panelClass: ['notify-snackbar']
});
}
The laptops we were using have touch screens which I believe would make this flag true and thus give us that banner.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in CSETWebNg/src/app/layout/layout-main/layout-main.component.ts around line 148 and inspect how hasTouchScreen sets isMobile before the snackbar opens. Verify the behavior on a touch-screen laptop and a mobile device. Done means the horizontal-view banner no longer appears on non-mobile devices while remaining available for mobile users.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100