-
Notifications
You must be signed in to change notification settings - Fork 0
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
[IGNORE] Tom timer refresh #127
Conversation
…m-proxy_prod_dummie_dashboard
const timeStr = jsDateObject.getUTCHours() + ":" + utcMinutesZeroPrefixed; | ||
|
||
this.props.setDateTimeAction(dateStr, timeStr); | ||
} |
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.
Deze logica (die een jsDateObject omzet naar een string afgerond op minuten) zou beter op de reducer kunnen denk ik. Het is een constraint van de onze data store die daar bewaakt moet worden.
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.
Ja denk dat je gelijk hebt. Zolang de Date dan maar als parameter wordt meegegeven.
De regel "const jsDateObject = new Date();" moet dan uit deze functie. Dit om te voorkomen dat reducer statefull wordt.
) { | ||
if (!this.props.iframeModeActive) { | ||
this.props.fetchAlarms(); | ||
} |
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.
Er moet een functie komen op de Redux store, die "now" oplevert; en dat is ofwel configuredNow als die er is, of de laatst geupdate setDateTime.
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.
Ja klopt. Deze bestaat ook namelijk de functie " getConfiguredNow(state)" zoals die in de reducer.js staat. Deze gebruiken we hier ook, namelijk zie de functie mapStateToProps hieronder. De functie hierboven bepaald dus niet welke 'now' gebruikt wordt, maar vergelijkt de huidige now met de voorgaande now en bepaald zo of een nieuwe render cycle nodig is. De naamgeving is misschien wel verwarrend.
@@ -142,7 +143,7 @@ export function fetchBootstrap(dispatch, sessionState) { | |||
|
|||
dispatch(fetchBootstrapAction()); | |||
|
|||
getBootstrap("parramatta-dashboard").then( | |||
getBootstrap("tdb_parra_vnrdsxt574").then( |
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.
XXX
@@ -149,7 +149,7 @@ class GridLayout extends Component { | |||
|
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.
Wijzigingen deze file zijn allemaal alleen syntax wijzigingen.
Meestal gedaan door linter.
Soms door mij gedaan om logging te kunnen toevoegen.
@@ -764,56 +800,6 @@ class TimeseriesChartComponent extends Component { | |||
} | |||
} | |||
|
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.
Deze is van plek verandert. Zie volgende groene blok
return null; | ||
} else { | ||
for (let longUuid in state.rasterEvents) { | ||
shortIntersectionUuid = longUuid.slice(0, 7); |
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.
Ik vind het zo erg dat deze kennis overal door onze codebase heen zit.
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.
Als ik je goed begrijp dan bedoel je dat de check of bepaalde api objecten gereed zijn in meerdere componenten in de mapstatetoprops functie (of andere plekken) staat gehardcode.
Ik denk dat dit wel naar de reduxstore zou kunnen?
Closed because already merged as part of: |
No description provided.