-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom Labels Step 2 #1120
Custom Labels Step 2 #1120
Conversation
increase new mode frequency and decrease old mode frequency
… tab and the 'Profile' tab
TODO : handling custom purpose label
…replaced_mode ...) functions to em
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1120 +/- ##
==========================================
- Coverage 30.36% 30.09% -0.27%
==========================================
Files 118 118
Lines 5256 5203 -53
Branches 1106 1113 +7
==========================================
- Hits 1596 1566 -30
+ Misses 3658 3635 -23
Partials 2 2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…-phone into customize-modes-step2
The `Icon` component was added in 5.11.0 and is referenced in CustomLabelSettingRow. So we must use 5.11.0 at minimum
@jiji14 Can you change target branch to |
Done! |
I noticed a few issues while testing this. I don't know if they were present before; they could be new issues from merging in changes from upstream. I also merged in Step 1 here so we can be sure Step 1 and Step 2 are working together. Either way, @jiji14 could you take a look? Custom Labels from label screen don't appear on profile screenGo to the Profile screen > Manage Custom Labels and see the list of current labels (if any). Then go to the Label screen and add a custom label (via "Other..."). Then go back to the Profile screen > Manage Custom Labels, the new label does not appear immediately. After reloading, the new label does appear there Custom labels don't appear on label screen until you interact with the "Other" inputOn the label screen, I can go to "Other" and add a new custom label. Then if I go to label a new trip, the custom label shows (as expected). But if I kill the app and re-open the app, they appear to have disappeared. When I add a new custom label, I see the old ones again. |
The error occurred after merging. I fixed the bugs and also took care of the code coverage issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this again and it works really well! The bugs from merging in were probably my mistake (bad merge conflict resolution).
Below are 3 quick suggestions I have, once they are applied I will pass this along!
Co-authored-by: Jack Greenlee <JackAGreenlee@gmail.com>
Co-authored-by: Jack Greenlee <JackAGreenlee@gmail.com>
Co-authored-by: Jack Greenlee <JackAGreenlee@gmail.com>
@JGreenlee @shankari |
@jiji14 or @JGreenlee can you resolve the merge conflict? I will likely target another staging release for this week so we can be testing next week. |
resolved |
…into customize-modes-step2
Support e-mission/e-mission-phone#1120 and other changes found while adding it. @Abby-Wheelis we may want to check with the Lao team and sync up changes (potentially using @JGreenlee's script) since the custom label changes will be fairly visibile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to go ahead and merge this since it is correct, but I think it might need enhancements as part of the CO2 calculations. Right now, when the user adds a new custom mode, we don't store any CO2 information as part of it. It seems like we should, but it is not clear that the end user knows the energy/emissions intensity of the mode that they add.
I can put this up on staging/nrel-commute for now, but we should really decide how we are going to handle this before we move to production in general, since otherwise we have to deal with data migration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added Spanish translations in e-mission/e-mission-translate@e658a1a. Still need to add Lao translations @Abby-Wheelis
import { initCustomDatasetHelper } from './metrics/customMetricsHelper'; | ||
import AlertBar from './components/AlertBar'; | ||
import Main from './Main'; | ||
|
||
export const AppContext = createContext<any>({}); | ||
const CUSTOM_LABEL_KEYS_IN_DATABASE = ['mode', 'purpose']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JGreenlee don't we need this for replaced mode as well? Or is the expectation that the replaced mode will also share the custom labels from the regular mode?
{(modalVisibleFor === 'MODE' || | ||
modalVisibleFor === 'REPLACED_MODE') && | ||
t('trip-confirm.custom-mode')} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see that we do in fact use the same values for both MODE
and REPLACED_MODE
Related Issue
What I added
Profile
Tab.Insert
/Delete
FunctionsResult
Please check out to
customize-modes
branch in theServer
repository for testing.