Skip to content

Conversation

@landonreed
Copy link
Member

This PR partially accomplishes mobile compatibility for batch routing by updating the search screen to:

image

// Render batch search screen if batch routing enabled. Otherwise,
// default to standard search screen.
const SearchScreen = isBatchRoutingEnabled(config)
? BatchSearchScreen
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This kind of goes against the idea that the implementing application is able to choose between either the DefaultMainPanel and the BatchRoutingPanel. In here, the BatchSearchScreen and all its associated dependencies are always imported even if they aren't supposed to be used. Perhaps the SearchScreen can be made into a required prop that must be set by the implementing app.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, agreed. I had this thought also. Thanks for flagging. I was considering whether SearchScreen should be a required prop or if we should have mobileView be configurable in trimet-mod-otp and have a separate file from main.js for batch routing that handles the functionality/logic from this file. Right now, there's only minor differences between the two (the search screen), but the option to define different mobileViews in trimet-mod-otp might be nice to have. Thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After looking at this more, I'm not sure why there are even slots for desktopView and mobileView at all, especially now that we're allowing the configuration of custom components via the context API. The example.js and trimet-mod-otp files are nearly identical in how they render all this. Also, all the stuff in desktopView and mobileView is super connected to all the otp-react-redux internals that I don't think you'd ever want to define a cust mobileView and if you did, you'd just be writing a different app anyways.

I've gone ahead and refactored ResponsiveWebapp so that it does away with the desktopView and mobileView slots completely and now it relies more on the Context API for the things we did want to customize. See #337.

@evansiroky
Copy link
Contributor

There's a lot of unused space in the date/time section.

Screen Shot 2021-02-19 at 5 10 00 PM

It'd look better, especially in mobile, for this area to only go as far down as just below the last element.

Copy link
Contributor

@evansiroky evansiroky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments. Also, one of the GitHub Actions is failing.

@evansiroky evansiroky assigned landonreed and unassigned evansiroky Feb 20, 2021
@landonreed
Copy link
Member Author

@evansiroky, thanks for the comments. Quick question for you above regarding the mobile search screen.

Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I'll go with @evansiroky's comments and give a pass on props ordering.

@binh-dam-ibigroup binh-dam-ibigroup removed their assignment Feb 22, 2021
Copy link
Contributor

@evansiroky evansiroky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See proposed changes in #337.

@evansiroky evansiroky removed their assignment Feb 25, 2021
@evansiroky
Copy link
Contributor

I've merged in #337 and also fixed the ItineraryCarousel to properly show the expanded ItineraryBody.

@codecov-io
Copy link

Codecov Report

Merging #332 (56336ab) into dev (0457a25) will decrease coverage by 0.74%.
The diff coverage is 9.63%.

Impacted file tree graph

@@           Coverage Diff            @@
##             dev    #332      +/-   ##
========================================
- Coverage   9.78%   9.03%   -0.75%     
========================================
  Files        115     178      +63     
  Lines       4078    6528    +2450     
  Branches    1077    1683     +606     
========================================
+ Hits         399     590     +191     
- Misses      3191    5100    +1909     
- Partials     488     838     +350     
Impacted Files Coverage Δ
lib/actions/auth.js 0.00% <0.00%> (ø)
lib/actions/call-taker.js 0.00% <0.00%> (ø)
lib/actions/form.js 22.22% <0.00%> (-0.36%) ⬇️
lib/actions/ui.js 19.83% <0.00%> (-0.17%) ⬇️
lib/actions/user.js 0.00% <0.00%> (ø)
lib/components/admin/call-record.js 0.00% <0.00%> (ø)
lib/components/admin/call-taker-controls.js 0.00% <0.00%> (ø)
lib/components/admin/call-taker-windows.js 0.00% <0.00%> (ø)
lib/components/admin/call-time-counter.js 0.00% <0.00%> (ø)
lib/components/admin/draggable-window.js 0.00% <0.00%> (ø)
... and 210 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5494729...56336ab. Read the comment docs.

Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval stands, just one tiny item to clean up.

import BatchPreferences from './batch-preferences'
import DateTimeModal from './date-time-modal'
import ModeButtons, {MODE_OPTIONS, StyledModeButton} from './mode-buttons'
// import UserSettings from '../form/user-settings'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove this import.

@binh-dam-ibigroup binh-dam-ibigroup removed their assignment Mar 10, 2021
@landonreed landonreed merged commit 428bf34 into dev Mar 10, 2021
@landonreed landonreed deleted the batch-routing-mobile-search branch March 10, 2021 21:12
@evansiroky evansiroky mentioned this pull request Mar 31, 2021
@github-actions
Copy link
Contributor

🎉 This PR is included in version 3.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants