Skip to content

Conversation

@dcalhoun
Copy link
Member

  • Set a project Node.js version mirroring the Gutenberg project to avoid version conflicts.
  • Enable web view inspection to improve debugging.
  • Add effect clean up to avoid block registration errors.

dcalhoun added 3 commits July 9, 2024 13:33
Avoid unexpected version issues.
React strict mode double runs effects, which led to numerous errors like
the following:

```
[Error] Block "core/paragraph" is already registered.
```
@dcalhoun dcalhoun marked this pull request as ready for review July 10, 2024 15:54
Copy link
Contributor

@kean kean left a comment

Choose a reason for hiding this comment

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

This repo was originally intended to be a throw-away prototype—especially the CSS code—but there is probably some value in keeping it. The Swift package, the WKWebView management code, and the Vite setup aren't so bad.

I'm going to move this to the wordpress-mobile organization.

The PR looks good, except for one comment I left.

webView.alpha = 0

if #available(iOS 16.4, *) {
webView.isInspectable = true
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure what's the implication of making a web view inspectable, but I decided to keep it off by default. The app enables it in the debug mode.

Copy link
Member Author

Choose a reason for hiding this comment

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

I interpet "debug mode" to mean the scheme configuration for running the app. I have that enabled, but the web view does not display as inspectable for me in Safari. Am I missing something?

Xcode Scheme Safari Inspector
run-with-debug no-inspectable-applications

Copy link
Contributor

@kean kean Jul 10, 2024

Choose a reason for hiding this comment

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

Ah, I forgot I only enabled it in the jpios/wpios apps but not in this demo. I suggest enabling it in the demo project instead of the package itself.

Copy link
Contributor

Choose a reason for hiding this comment

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

I moved this to the Demo if you don't mind – merging.

@dcalhoun
Copy link
Member Author

dcalhoun commented Jul 10, 2024

This repo was originally intended to be a throw-away prototype—especially the CSS code—but there is probably some value in keeping it. The Swift package, the WKWebView management code, and the Vite setup aren't so bad.

I'm going to move this to the wordpress-mobile organization.

Make sense. I still consider it throw away as well, but figured continued explorations were worth sharing in a central location.

@kean kean merged commit 821dbbe into wordpress-mobile:main Jul 10, 2024
@dcalhoun dcalhoun deleted the refactor/improve-build-configuration branch July 10, 2024 17:55
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.

2 participants