Skip to content

Rename XTypeGroup's macUTIs #103743

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

Closed
stuartmorgan-g opened this issue May 13, 2022 · 4 comments · Fixed by flutter/packages#3888
Closed

Rename XTypeGroup's macUTIs #103743

stuartmorgan-g opened this issue May 13, 2022 · 4 comments · Fixed by flutter/packages#3888
Assignees
Labels
p: file_selector The file_selector plugin P2 Important issues not at the top of the work list package flutter/packages repository. See also p: labels.

Comments

@stuartmorgan-g
Copy link
Contributor

We have a field called macUTIs, but it will be used for iOS too. We should rename it, with aliases (using get and set) to preserve backward compatibility.

@stuartmorgan-g stuartmorgan-g added plugin P2 Important issues not at the top of the work list p: file_selector The file_selector plugin labels May 13, 2022
@juandausa
Copy link

Hi @stuartmorgan, I was looking into starting contributing a bit to the project.
We looked into the code and discovered that both the Mac and iOS implementation use the property macUTIs. We modified the main example to include this field, and it's currently working on the different platforms.

Furthermore, we believe that changing macUTIs to cupertinoUTIs would be a good replacement but, it will generate a breaking change. Can you elaborate on the way you proposed to preserve backward compatibility?

Thanks,

@stuartmorgan-g
Copy link
Contributor Author

stuartmorgan-g commented Sep 14, 2022

Furthermore, we believe that changing macUTIs to cupertinoUTIs would be a good replacement

cupertino is a confusing term in many contexts, and in the framework it explicitly means "iOS" not "iOS and macOS", so I definitely don't want to use it here. We should just call it uniformTypeIdentifiers, since that's an unambiguous term.

Can you elaborate on the way you proposed to preserve backward compatibility?

macUTIs can be left as a synthetic property that forwards to the new name. I.e., a construction like:

class Foo {
  bool foo = false;
  bool get bar => foo;
  set bar(bool value) { foo = value; }
}

Once that's published and file_selector has been updated to use the new names, the old name can be @Deprecated.

@juandausa
Copy link

Hi @stuartmorgan we appreciate your prompt response and clarification, we'll take this approach.

@stuartmorgan-g stuartmorgan-g self-assigned this Apr 17, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this issue May 1, 2023
A change to replace `macUTIs` with `uniformTypeIdentifiers` (with `macUTIs` staying as an alias for compatibility) landed a while ago in the platform interface, but the rest of the packages were never updated to use it. This removes uses from all other packages, in preparation for formally deprecating `macUTIs`.

Mostly completes flutter/flutter#103743
stuartmorgan-g added a commit to stuartmorgan-g/packages that referenced this issue May 2, 2023
Now that all in-repo consuming code has switch to `uniformTypeIdentifiers`,
deprecate `macUTIs` (and minimize internal use of it in this package).

Fixes flutter/flutter#103743
auto-submit bot pushed a commit to flutter/packages that referenced this issue May 3, 2023
Now that all in-repo consuming code has switch to `uniformTypeIdentifiers`, deprecate `macUTIs` (and minimize internal use of it in this package).

Fixes flutter/flutter#103743
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 17, 2023
@flutter-triage-bot flutter-triage-bot bot added the package flutter/packages repository. See also p: labels. label Jul 5, 2023
nploi pushed a commit to nploi/packages that referenced this issue Jul 16, 2023
Now that all in-repo consuming code has switch to `uniformTypeIdentifiers`, deprecate `macUTIs` (and minimize internal use of it in this package).

Fixes flutter/flutter#103743
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p: file_selector The file_selector plugin P2 Important issues not at the top of the work list package flutter/packages repository. See also p: labels.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants