Skip to content

Commit de0e5f3

Browse files
Make App Responsiveness (#60)
* add to PR template * add new .md * add md link * undo * Update ResponsivenessTesting.md * update md file * initial code for responsiveness * landscape views * landscape changes * add arrow code * rearrange buttons * biteSelect * Update ResponsivenessTesting.md * Update ResponsivenessTesting.md * Update ResponsivenessTesting.md * Update ResponsivenessTesting.md * custom hook and landscape for video * review response * button width and height * add footer width * width * remove copied code in footer * add comments * variables of font size and wisth * change dependency * comma check done * biteSelection position fix * fix variables * add margin variable * footer width adjust * variable in-line * comments add * add format * add video in helper * callback add * useEffect for video and plateLocator lock * food image button fixes * acqusition button fix * bite done and seletion * skip button resize * skip fix * skip button space remove * mask * mask update * add * use percentage of size * mask updates * mask working now * some PR cooments responded * progress bar and text auto-sizing * make footer responsiveness and tested in all device * adjust header sizes in vw vh * add responsiveness changes * some PR response * PR responses * Implemented vertical centering (#66) * Implemented vertical centering * overlap fix * header fix * merged amals pr --------- Co-authored-by: Raida Karim <[email protected]> * add circle bar size * matching top bottom * small fix * footer fix * header fix * add phantom view * footer fix * Fixed circle bar size on RobotMotion page (#68) fixed circle bar size on RobotMotion page * responsiveness * add more * small changes * Fix Video Scaling Responsiveness (#69) fixed video scaling responsiveness * remove phantom view from footer and robotmotion * helper add * PR response * resizing * fix after test * add vw * lock fix * add comments * add height fix * height fix * use windoe size * useWindowSize and header fix * Fix iOS 100vh Bug & Other Responsiveness Bugs (#71) * Fixed header/footer height - Increased header/footer height in landscape - Made all header elements Nav.Link for consistent height * Fix RobotMotion - Remove all overrides of text font size from h1/h2/h3... These are already responsive. - Remove nested h1's, which is invalid DOM nesting * Fix RobotMotion Bug - Changing the screen height on resize introduced a bug where RobotMotion re-calls the action. The changes to Home.jsx address that. - Implements Raida's idea for a simple solution to the iOS '100vh' bug that uses existing helpers * Fix VideoFeed resizing bug * Fixed CircleProgressBar size in landscape * Address iOS orientation change bug * Remove unused package Div100vh * Lengthened the delay for window size due to iOS orientation change issue * Platelocator button height and live video font size increase and robotmotion fontsize modify * Fix footer font size --------- Co-authored-by: Raida Karim <[email protected]> --------- Co-authored-by: Amal Nanavati <[email protected]>
1 parent 0ca9f0b commit de0e5f3

24 files changed

+1449
-599
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
- [ ] Format React code with `npm run format`
1414
- [ ] Format Python code by running `python3 -m black .` in the top-level of this repository
1515
- [ ] Thoroughly test your code's functionality, including unintended uses.
16-
- [ ] Thoroughly test your code's responsiveness by rendering it on different devices, browsers, etc.
16+
- [ ] Fully test the responsiveness of the feature as documented in the [Responsiveness Testing Guidelines](https://github.com/personalrobotics/feeding_web_interface/blob/main/feedingwebapp/ResponsivenessTesting.md). If you deviate from those guidelines, document above why you deviated and what you did instead.
1717
- [ ] Consider the user flow between states that this feature introduces, consider different situations that might occur for the user, and ensure that there is no way for the user to get stuck in a loop.
1818

1919
**Before merging a pull request**
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Methodology for Testing Responsiveness
2+
3+
After developing an app feature, make sure to test it on the following setups. Total 4 devices as listed below.
4+
- **Smartphone:** iPhone 14 Plus [Tyler]; Width: 428 & Height: 926
5+
- Landscape
6+
- Portrait
7+
- **Tablet:** iPad Pro (6th gen 12.9") [Tyler]; Width: 1024 & Height: 1366
8+
- Landscape
9+
- Portrait
10+
- **External Monitor:** Width: 4096 & Height: 2304
11+
- **Laptop:** Width: 2560 & Height: 1600
12+
- Full-screen
13+
- Half-screen (vertical split)
14+
- Quarter screen
15+
16+
For the smartphone and laptops, test on Chrome, Firefox, Edge, and Safari. For the tablet and monitor, pick one browser to test it on.
17+
18+
In total, you will run 23 tests (4 browsers * 1 smartphone * 2 orientations + 1 tablet * 2 orientations + 4 browsers * 3 laptops + 1 monitor).
19+
20+
In portrait, pages should have their content appear on one screen and not require scrolling. In landscape, scrolling may be unavoidable for some screens, but try to rearrange the content horizontally in order to minimize required scrolling.
21+
22+
If you don’t have the listed devices available for testing, please “Add custom device” in your browser’s responsive design mode using the width and height of the specific device’s resolution below. Please find the appropriate link from below for each browser's documentation on how to do this *except* Safari:
23+
24+
1. https://www.ios-resolution.com/
25+
2. https://support.apple.com/kb/SP748?locale=en_US
26+
3. Adding custom device in Chrome: https://developer.chrome.com/blog/add-a-new-custom-device-as-a-preset/
27+
4. Adding custom device in Edge: https://learn.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/device-mode/
28+
5. Adding custom device in Firefox:
29+
https://firefox-source-docs.mozilla.org/devtools-user/responsive_design_mode/#creating-custom-devices
30+
31+
32+

feedingwebapp/package-lock.json

+36
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

feedingwebapp/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"react-dom": "^18.1.0",
1515
"react-hook-form": "^7.43.9",
1616
"react-native-web": "^0.19.4",
17+
"react-responsive": "^9.0.2",
1718
"react-router-dom": "^6.3.0",
1819
"react-script-tag": "^1.1.2",
1920
"react-scripts": "^5.0.1",

0 commit comments

Comments
 (0)