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

Deprecate FileUpload component and FileDropzone attribute args #706

Merged
merged 5 commits into from
Mar 29, 2022

Conversation

gilest
Copy link
Collaborator

@gilest gilest commented Feb 22, 2022

Register all v5 deprecations until v6. This includes the entire FileUpload component.

@gilest gilest requested review from gossi and jelhan February 22, 2022 00:25
@@ -129,6 +141,77 @@ export default class FileDropzoneComponent extends Component<FileDropzoneArgs> {
window.document &&
'draggable' in document.createElement('span'))();

constructor(owner: unknown, args: FileDropzoneArgs) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is checking args in the constructor the best way to do this?

Comment on lines 102 to 111
deprecate(
`\`<FileUpload>\` is deprecated. Use \`{{file-queue}}\` helper with \`{{queue.selectFile}}\` modifier.`,
false,
{
for: 'ember-file-upload',
id: 'file-upload',
since: { enabled: 'v5.0.0' },
until: 'v6.0.0',
}
);
Copy link
Collaborator Author

@gilest gilest Feb 22, 2022

Choose a reason for hiding this comment

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

There's a lot of deprecated arguments also – but I figured a single deprecation warning with a (soon to be added) link to good upgrade docs is the best way forward here.

Comment on lines +39 to +46
/**
* Whether to add multiple files to the queue at once.
*
* If set to false only one file will be added when dropping mulitple files.
*
* @defaultValue true
*/
multiple?: boolean;
Copy link
Collaborator Author

@gilest gilest Feb 22, 2022

Choose a reason for hiding this comment

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

Decided not to deprecate as I can't think of an easy way to suggest a user implementation of the same feature.

@gilest gilest mentioned this pull request Feb 22, 2022
22 tasks
@gilest gilest changed the title Register v5 deprecations Deprecate <FIleUpload> component and <FileDropzone> args Feb 22, 2022
@gilest gilest changed the title Deprecate <FIleUpload> component and <FileDropzone> args Deprecate <FileUpload> component and <FileDropzone> args Feb 22, 2022
@gilest gilest mentioned this pull request Mar 6, 2022
@cloudflare-pages
Copy link

cloudflare-pages bot commented Mar 29, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: deacc16
Status: ✅  Deploy successful!
Preview URL: https://e3ef4ec4.ember-file-upload.pages.dev

View logs

@gilest gilest changed the title Deprecate <FileUpload> component and <FileDropzone> args Deprecate FileUpload component and FileDropzone attribute args Mar 29, 2022
@gilest gilest merged commit 66ee574 into master Mar 29, 2022
@gilest gilest deleted the register-deprecations branch March 29, 2022 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant