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

#346 | Refresh every APP state after save event #357

Merged
merged 10 commits into from
Apr 1, 2021

Conversation

szymon-owczarzak
Copy link
Contributor

@szymon-owczarzak szymon-owczarzak commented Mar 31, 2021

Description

More details in related issue: #346

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • Automated functional tests have been added or modified to cover my changes (if applicable)
  • I have updated the documentation accordingly.

I hereby agree to the terms of the Cogboard Contributor License Agreement.

@szymon-owczarzak szymon-owczarzak added the enhancement New feature or request label Mar 31, 2021
@szymon-owczarzak szymon-owczarzak added the not ready Add this label when task is not ready for development label Mar 31, 2021
@szymon-owczarzak szymon-owczarzak linked an issue Mar 31, 2021 that may be closed by this pull request
4 tasks
Comment on lines +335 to +338
CONFIG_LOADED: () => ({
type: 'info',
message: 'Config Loaded',
duration: 3000
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cogboard will now display a message each time a new config is loaded in the background.

Comment on lines -132 to -134
export const saveDataStart = () => ({
type: SAVE_DATA_START
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not used

dispatch(saveDataSuccess());
dispatch(refetchInitData());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

on SAVE event success - fetch config again

@szymon-owczarzak szymon-owczarzak changed the title Refresh app state after save General | Refresh every APP state after save event Mar 31, 2021
Comment on lines -9 to -15
const val STATUS_CODE_401 = 401
const val STATUS_CODE_200 = 200
const val PROP_ID = "id"
const val PROP_EVENT_TYPE = "eventType"
const val PROP_BOARDS = "boards"
const val PROP_BOARDS_BY_ID = "boardsById"
const val PROP_BOARDS_ALL = "allBoards"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved to separate objects...

@szymon-owczarzak szymon-owczarzak removed the not ready Add this label when task is not ready for development label Mar 31, 2021
devzbysiu
devzbysiu previously approved these changes Apr 1, 2021
@@ -9,26 +11,23 @@ import io.vertx.core.logging.LoggerFactory
class ConfirmationSender(private val vertx: Vertx) {

fun sendOk() {
vertx.eventBus().send(CogboardConstants.EVENT_SEND_MESSAGE_TO_WEBSOCKET,
JsonObject().message(OK_MESSAGE))
vertx.eventBus().send(Event.SEND_MESSAGE_TO_WEBSOCKET, JsonObject().message(OK_MESSAGE))
}

fun sendError(body: JsonObject) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this method used somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No it is not i will delete

yahorm
yahorm previously approved these changes Apr 1, 2021
Copy link
Collaborator

@yahorm yahorm left a comment

Choose a reason for hiding this comment

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

great job @szymon-owczarzak! the constants have become more readable :)

@szymon-owczarzak szymon-owczarzak dismissed stale reviews from yahorm and devzbysiu via 9e0528b April 1, 2021 13:07
@szymon-owczarzak szymon-owczarzak merged commit 2c34c4d into master Apr 1, 2021
@szymon-owczarzak szymon-owczarzak deleted the refresh-app-state-after-save branch April 1, 2021 13:25
@szymon-owczarzak szymon-owczarzak changed the title General | Refresh every APP state after save event #346 | Refresh every APP state after save event Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refresh app state after successful save operation
3 participants