-
-
Notifications
You must be signed in to change notification settings - Fork 75
π Mobile v1.1 Documentation Updates #178
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
base: main
Are you sure you want to change the base?
Conversation
- Reorganize v1.1 documentation with new APIs and concepts sections - Add comprehensive database security guidance covering API-first architecture, Laravel Sanctum integration, and SecureStorage best practices - Simplify Haptics API documentation to essential examples and usage patterns - Add Windows performance tip for faster composer installs during compilation - Improve geolocation API documentation with detailed event handling - Update installation guide with platform-specific optimizations - Restructure v1.1 content hierarchy for better developer experience
- Merge installation.md: preserve platform requirements from main + Windows performance tip - Update ShowDocumentationController.php with latest changes
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.
Overall this looks good. I'm concerned about the amount of "Old way - Don't do this" kind of docs we have here. I think instead, as I mentioned on this comments we should update the codebase and throw:
user_error('System::camera() should not longer be used. See {{$docLink}} for more information.', E_USER_DEPRECATED);
I think that's smarter else if someone struggles with a correct method, they might just backtrack to old deprecated and unsupported code.
Otherwise, great work man!
@@ -65,7 +64,8 @@ protected function getPageProperties($platform, $version, $page = null): array | |||
$pageProperties = $document->matter(); | |||
|
|||
$versionProperties = YamlFrontMatter::parseFile(resource_path("views/docs/{$platform}/{$version}/_index.md")); | |||
$pageProperties = array_merge($pageProperties, $versionProperties->matter()); | |||
|
|||
$pageProperties = array_merge($versionProperties->matter(), $pageProperties); |
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.
Not necessarily an issue but can you help me understand why the order of arguments were switched here? Was something being overwritten we wasn't expecting? π
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.
Actually yeah, and maybe you can verify, locally for me every page showed "Mobile" as the title of the document, reversing this fixed it for me. On the website currently it works fine now, not sure what's going on tbh and I didn't switch it back.
|
||
## What Makes NativePHP Mobile Special? | ||
|
||
=β¬ **Native Performance** - Your app runs natively on device with embedded PHP runtime |
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.
Is this just a GitHub display issue or are these characters genuinely not meant to be here?
## Migration from System Facade | ||
|
||
```php | ||
// Old way (deprecated) |
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.
I personally think we should no longer document the "old way" at all. Instead, in the project itself, we should throw a deprecation warning to bubble this up.
## Migration from System Facade | ||
|
||
```php | ||
// Old way (deprecated) |
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.
Again, I really think we shouldn't document it otherwise bad-practices form.
Lets throw a deprecation in the code!
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.
We won't throw just add the doc blocks so IDE's know - it will still work.
If you were using the deprecated `System::secureSet()` and `System::secureGet()` methods: | ||
|
||
```php | ||
// Old way (deprecated) |
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.
Lose it. Throw deprecation :D
Co-authored-by: Peter Bishop <9081809+PeteBishwhip@users.noreply.github.com>
Summary
Comprehensive updates to mobile v1.1 documentation improving structure, content, and developer experience.
Key Changes
Documentation Structure Changes
/apis/
section/concepts/
section for architectural guidanceSecurity Improvements
Developer Experience
All changes maintain backward compatibility and improve the overall documentation quality for mobile v1.1 developers.