-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
Upgrade to glimmer components and native classes #514
Merged
Conversation
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
gilest
commented
Sep 1, 2021
bertdeblock
reviewed
Sep 3, 2021
bertdeblock
reviewed
Sep 3, 2021
…es mixin Derive all files at the top level from child queue state Only flush files at Queue level wip - test waiters
- add glimmer packages - remove @babel/core as it is a child dependency of ember-cli-babel
Ensure queue is updated when component args update by implementing update-queue modifer.
More similar behaviour to previous classic component version.
Migrated remaining usage of .extend to native classes.
Move `@ember/test-waiters` to dependencies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Migration to Octane edition. Deals with all legacy ember objects, components, mixins and general tech debt.
Attempting to support the existing public API so that we can release this as a
v4.x.0
minor. Possibly with a beta first to make sure there are no regressions.Notable changes
Queue instances and the FileQueue service
Reworked this relationship significantly.
Previously File objects were added to the FileQueue service as well as the Queue instances themselves. They shared some behaviour for this via the
WithFiles
mixin.Now the FileQueue service declaratively accesses files within all Queue instances to provide its public API. All queue flushing has been removed from the FileQueue service – it's the responsibility of the Queue instances only.
Queue flushing
After refactoring away from observers (#307) we added manual calls to
Queue.flush()
after any internal file state changes.This required that we warn users they may need to flush manually if they change the file state property themselves:
I've refactored this by using a setter to call
Queue.flush()
on any file state changes and removed this piece of documentation.Queue instances and Components
When
FileUpload
/FileDropzone
calldidRecieveAttrs
they directly set some properties on their queue.I've refactored this to an
update-queue
modifier.When testing this I noticed that it's an unsafe operation – the queue only has a single property for each of these and there's no guarantee about the order in which properties might overwrite each other. (For example when rendering a dropzone and a file select for the same queue).
I'm comfortable releasing as-is for now (believe it's the same as existing functionality) – but we should reconsider this API in the future.
DragListener
I've also refactored this into a modifier.
This required me to adjust the
DragListener
class to work with an element rather than a selector.Test waiters
Migrated from old
registerWaiter
to the newbuildWaiter
from@ember/test-waiters
.Component DOM
Almost identical to before. Since
FileDropzone
renders a wrapper div I added...attributes
to it.FileUpload
is a bit more complex with the label/input relationship and existing attribute args so I left it the same as before.I also removed an assertion about the wrapper tag of
FileUpload
as it's no longer possible to pass intagName
and override it.Dependencies
Since I added modifiers I've added
ember-modifier
to dependencies.Also added glimmer packages and removed
@babel/core
- not sure why it was ever included.Questions
?.
and nullish coalescing??
. Is this safe? Do I need to configure something for this?addon/utils
is that safe? Will that work?