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

Basic support Safari #79

Merged
merged 23 commits into from
Sep 17, 2022
Merged

Basic support Safari #79

merged 23 commits into from
Sep 17, 2022

Conversation

modos189
Copy link
Contributor

Thanks to @lucka-me
closed #66

@modos189 modos189 changed the title Basic support safari Basic support Safari Aug 14, 2022
@github-actions
Copy link

Here are the build results
iitc-button-0bc7d67a6a6644c6408b618f8f6f5473a96584fb-artifact.zip
Artifacts will only be retained for 90 days.

@lucka-me
Copy link
Contributor

Thank you for the update! I run the project and some issues are revealed.

iOS

The background page is still required to be non-persistent:
iOS

macOS

The width of popup is incorrectly doubled when it shows up:
When shows up
...and then collapse to the almost right one immediately:
Collapsed

Build Number

When I created the Xcode project, I added a target named "Version" to generate the CFBundleVersion (the build number) from current commit count. But it seems to lead to an error when I run the project with Xcode 14 beta 4, "The bundle’s Info.plist does not contain a CFBundleVersion key or its value is not a string". I have not dug into it yet, but the target could be removed if you prefer to maintain the build number manually.

@modos189
Copy link
Contributor Author

iOS

To be able to intercept .user.js files to install in the IITC Button, persistent is required. This is true for Safari on macOS, as well as Chrome and Firefox.
I haven't checked in Safari for iOS, but because of https://github.com/IITC-CE/IITC-Button/pull/79/files#diff-d7072b9c615837a7b1318ff38a6dda1ea436aeb0b8fc073d1b32e52b73378937R37 I thought that this feature doesn't exist there at all on Safari on iOS. It just shows an error message, but the extension works?

macOS

Yes, reducing the size of the popup some time after it opens is such a hack. You suggested to give up animations, but I don't want to do that.
However, I have now come up with a compromise: when we create a window, we can swap out styles and disable animation only for Safari, thereby the popup size will be calculated correctly and it will not affect other browsers.

Build Number

I want to generate a version based on the version in package.json. But I don't know how to do it. Maybe there are some libraries for this.

@lucka-me
Copy link
Contributor

For Safari for iOS, unfortunately, the extension is totally disabled by the system and can not work at all. So I'm wondering if it's possible to generate a separated manifest.json just for iOS?

For the animations, I do hope to keep them too, but I have little knowledge of CSS animation, so I simply disabled them to make the popup work. I guess the Safari doesn't always meet the standards.

For versioning, there are two version number in Xcode project: CFBundleShortVersionString is a semantic version like 1.7.0, and CFBundleVersion is a growing number like 102, I've made some modifications on 7b9ab0c to use the version in package.json as CFBundleVersion.

@github-actions
Copy link

Here are the build results
iitc-button-feced0b10840bde34e573881395a5b739aa5439d-artifact.zip
Artifacts will only be retained for 90 days.

@github-actions
Copy link

Here are the build results
iitc-button-e023e549eb78cce423ce9f3fef8a64b88d115629-artifact.zip
Artifacts will only be retained for 90 days.

@github-actions
Copy link

Here are the build results
iitc-button-6691cc961eecbe91c60c3aedbcb986787d5926ad-artifact.zip
Artifacts will only be retained for 90 days.

@github-actions
Copy link

Here are the build results
iitc-button-c2d9e480a55afe7a90e9ed4d445a7278e63a7a9f-artifact.zip
Artifacts will only be retained for 90 days.

@modos189 modos189 merged commit 7b688f8 into IITC-CE:master Sep 17, 2022
@github-actions
Copy link

Here are the build results
iitc-button--artifact.zip
Artifacts will only be retained for 90 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possibility to support Safari
2 participants