Skip to content
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

Closed
wants to merge 17 commits into from
Closed

[IGNORE] Tom timer refresh #127

wants to merge 17 commits into from

Conversation

Derryrover
Copy link
Contributor

No description provided.

@Derryrover Derryrover requested a review from GeOdin February 26, 2019 09:58
const timeStr = jsDateObject.getUTCHours() + ":" + utcMinutesZeroPrefixed;

this.props.setDateTimeAction(dateStr, timeStr);
}
Copy link
Contributor

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.

Copy link
Contributor Author

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();
}
Copy link
Contributor

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.

Copy link
Contributor Author

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(
Copy link
Contributor

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 {

Copy link
Contributor Author

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 {
}
}

Copy link
Contributor Author

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);
Copy link
Contributor

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.

Copy link
Contributor Author

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?

@Derryrover Derryrover changed the title [WIP] Tom timer refresh [IGNORE] Tom timer refresh Mar 6, 2019
@Derryrover
Copy link
Contributor Author

Closed because already merged as part of:
#129

@Derryrover Derryrover closed this Mar 6, 2019
@lexvand lexvand mentioned this pull request Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants