Skip to content

Clientside prevent update - #964

Merged
alexcjohnson merged 6 commits into
plotly:devfrom
jjaraalm:clientside_prevent_update
Oct 18, 2019
Merged

alexcjohnson merged 6 commits into
plotly:devfrom
jjaraalm:clientside_prevent_update

Conversation

@jjaraalm

Copy link
Copy Markdown
Contributor

Adds dash_clientside.no_update and dash_clientside.PreventUpdate to fix #963. Integration tests added and passing.

Also changed a Popen call in _utils.py so that the path is properly searched on windows machines. Otherwise, building was failing for me. Feel free to remove if you think it's not necessary.

Contributor Checklist

  • I have broken down my PR scope into the following TODO tasks
    • Allow clientside updates to be prevented.
  • I have run the tests locally and they passed. (refer to testing section in contributing)
  • I have added tests, or extended existing tests, to cover any new features or bugs fixed in this PR

optionals

  • I have added entry in the CHANGELOG.md
  • If this PR needs a follow-up in dash docs, community thread, I have mentioned the relevant URLS as follow
    • this github #PR number updates the dash docs
    • here is the show and tell thread in plotly dash community

@alexcjohnson

Copy link
Copy Markdown
Collaborator

Thanks @jjaraalm - looks fantastic. Very nice tests, very clean implementation.

To get the linter to pass, just cd dash-renderer then npm run format. We use prettier, which is sufficiently opinionated that I don't even know how to write compliant code myself, I just have it reformat whatever I write.

@jjaraalm

Copy link
Copy Markdown
Contributor Author

Thanks! It's all good, one day I hope to make my linters happy without effort ... one day ... maybe

@alexcjohnson

Copy link
Copy Markdown
Collaborator

Alright, looks great! This definitely merits an entry in the changelog, then it'll be ready to go. We'll hold off merging for a couple of days though, as we're planning a patch release 1.4.1 and this has new features so needs to go in a minor (1.5.0)

@chriddyp

Copy link
Copy Markdown
Member

This is great 🎉
Congrats @jjaraalm on braving your way through dash-renderer/src/actions/index.js . You are one of the first community contributors to do so! 🏆 🏆 🏆

@jjaraalm

Copy link
Copy Markdown
Contributor Author

Thanks @chriddyp !

@alexcjohnson should I update the changelog or will you all do it?

@alexcjohnson

Copy link
Copy Markdown
Collaborator

@jjaraalm go for it! Just add

## Unreleased
### Added

at the top, and try to format the entry like the ones below it.

Comment thread dash/dependencies.py

if namespace in ['PreventUpdate', 'no_update']:
raise ValueError('"{}" is a forbidden namespace in'
' dash_clientside.'.format(namespace))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

FYI @rpkyle - I think this namespace exclusion is the only piece of this PR that's relevant to R

@alexcjohnson alexcjohnson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

💃 Beautiful, very nicely done!

@alexcjohnson
alexcjohnson merged commit e959481 into plotly:dev Oct 18, 2019
HammadTheOne pushed a commit to HammadTheOne/dash that referenced this pull request May 28, 2021
…ash-4.17.21

Bump lodash from 4.17.19 to 4.17.21
HammadTheOne pushed a commit that referenced this pull request Jul 23, 2021
…17.21

Bump lodash from 4.17.19 to 4.17.21
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.

Clientside PreventUpdate and no_update

3 participants