-
Notifications
You must be signed in to change notification settings - Fork 566
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
Disable widgets #1632
Merged
Merged
Disable widgets #1632
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
fe93a1b
- added LifeCycle::DisabledChanged and InternalLifeCycle::RouteDisab…
3e1874b
created tests for disable
d6e34b2
fixed tests
500954e
fixed tests
f606199
updated core.rs and event.rs
6fd0b71
fixed focus-chain bug:
25d19c9
fix disabled update
e3d8b92
update tests
77d4f8f
fixed code (all tests succeed)
4d48edd
refactored core.rs and tests/mod.rs
9b2c8ba
updated tests
d5116de
fixed focus-chain bug
6c79e1e
make clippy happy
1fe6971
Merge branch 'master' into disable-widgets-2
xarvic 40be21f
make clippy happy #2
5520e5b
Apply suggestions from code review
xarvic 232e7ee
Update druid/src/contexts.rs
xarvic eccd596
refactor DisabledChanged
9754051
refactor DisabledChanged
74b86b2
fixed error, revered change of focus_chain
c181f51
refactored tests
cfc544e
reordered lifecycle events
05d45fc
reverted changes to the focus_chain
b9b9aca
implemented new focus-chain using LifeCycle::BuildFocusChain
f091bf9
update tests
4766ceb
fixed problems
a901d1c
updated texts
eb3cfd7
clippy fix
fdd510a
fixed documentation
4ef9697
Update druid/src/event.rs
xarvic 4745fe9
fixed documentation
4567f8f
made logic simpler
ba58aad
refactored post_event_processing
8d6b784
updated CHANGELOG.md
d3e73d1
fixed docs
7be336c
Merge branch 'master' into disable-widgets-2
xarvic a52437c
make clippy happy
2919953
Merge branch 'master' into disable-widgets-2
cmyr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 slightly scared of all the little bits of code scattered throughout this method, and I think it is going to be very important to carefully document what our invariants are, and what should go where.
For instance: why does this need to come after
merge_up
, and why does the preceding block need to come before?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 fixed some of them and added documentation to explain the rest.
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.
Hmmm :/ It wasn't as easy as i thought, but i think some of this complexity is necessary.
WidgetAdded
ctx.children_changed()
while routingWidgetAdded
, which makes no sense, but therefore after the call we don't know if the value was setThe current implementation always adds the own id when the focus_chain is cleared and focus_chain is set. Only in
WidgetAdded
the id is always added after the event.I don't know if there is a better way to satisfy the the conditions i mentioned?