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
Adding new symbols #80
Conversation
@Stevenmagdy Thank you very much for the PR! I just spent a quick look on this and wanted to share my observations:
|
@fredpi Thanks for the quick review!
Agreed.
Sure.
Indeed, this change is because the file size exceeded 30k LOC and it was making Xcode freeze. I thought the performance overhead was justified because it only computed once (it's a self-executed closure). I think we should discuss if we even need
I think we should either remove
That happened for me too but it was fixed automatically 😄 . I thought its because I'm on Big Sur which does not have the new symbols so Xcode was struggling to render them. |
@Stevenmagdy Thanks for the quick response! 😉
That's a fair point, I didn't see that you implemented it as a self-executed closured. Still, I'm wondering how much time it takes to call
Good catch! Just recently I learned about the use case of randomly picking one symbol: https://twitter.com/MattPfeiffer/status/1435238086716297228 I believe this is a valid use case and we should keep support for it. However, if the array has more than one element for the same symbol, the likelihood is distorted, meaning we should only add the latest symbol name to the array. Also, as you said, Summarized: Drop
What do you mean by saying it was fixed automatically? Has it been fixed by updating your macOS / Xcode? I'm running Monterey but am still seeing the issue: |
I understand this view, however, if we no longer include duplicates in the @available(*, deprecated, renamed: "allSymbols", message: "")
static var allCases: [SFSymbol] { return Array(SFSymbol.allSymbols) } Also, I think that the name But at the end of the day, this is not such an important question, so decide whatever you think is best and I will be fine with it. 👍
Yeah, that's indeed the case! Updating SFSymbols.app to 3.1 solved it for me, too. |
* Rename `allCases` to `allSymbols` * Make `allSymbols` a `Set` * Remove duplicate symbols from `allSymbols` * Add a deprecation warning for `allCases` * Edit tests to use `allSymbols`
@fredpi Done. btw, this PR also contains a fix for wrong(?) deprecation annotations for multiple renamings. Example: Previously, It's now fixed, |
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.
Thanks @Stevenmagdy 🎉
Adding new symbols from 2.2, 3.0, and 3.1 versions of SFSymbols