diff --git a/docs/responsive-webgui-plugin-migration-guide.md b/docs/responsive-webgui-plugin-migration-guide.md index c4097e5ef..30176382f 100644 --- a/docs/responsive-webgui-plugin-migration-guide.md +++ b/docs/responsive-webgui-plugin-migration-guide.md @@ -1,16 +1,21 @@ # Responsive WebGUI Plugin Migration Guide +## Table of Contents + +- [Why Responsive? The Benefits for Unraid Users & Developers](#why-responsive-the-benefits-for-unraid-users--developers) +- [Prerequisite: How .page Files Are Parsed](#prerequisite-how-page-files-are-parsed-markdown-whitespace-and-structure) +- [Common Bugs in .page Files](#common-bugs-in-page-files-and-how-to-fix-them) +- [Making Wide Tables Responsive](#making-wide-tables-responsive-using-the-tablecontainer-class) +- [Summary](#summary) +- [Quick Fix: Opting Out of Responsive Layout](#quick-fix-opting-out-of-responsive-layout-if-youre-short-on-time) + ## Why Responsive? The Benefits for Unraid Users & Developers -Unraid's webGUI has moved to a fully responsive design system. This isn't just a facelift—it's a fundamental shift in how plugins and core pages are built and rendered. Here's why this matters: +Unraid's webGUI has been refactored to support responsive CSS. Here's why this matters: -- **Mobile & Tablet Friendly:** Manage your server from any device, any screen size, no more pinching/zooming. +- **Mobile & Tablet Friendly:** Manage your server from any device, any screen size, no more pinching/zooming required. - **Consistent Layouts:** No more broken forms or tables on small screens. Everything adapts. - **Modern Look & Feel:** Cleaner, more professional UI that matches user expectations. -- **Future-Proof:** New features and plugins can be built once, work everywhere. -- **Accessibility:** Improved support for screen readers and keyboard navigation. - -**Bottom line:** Users get a better experience, and plugin devs spend less time fighting CSS and more time building features. --- @@ -19,23 +24,29 @@ Unraid's webGUI has moved to a fully responsive design system. This isn't just a Unraid's plugin system uses `.page` files, which are parsed using a custom Markdown engine. Understanding this is key to writing responsive plugins. ### The Parsing Pipeline + 1. **Header Parsing:** The top of the file (before `---`) is parsed as INI for metadata (Title, Menu, etc). 2. **Content Parsing:** The rest is parsed as Markdown, with special handling for translation (`_(text)_`) and definition lists. 3. **PHP Evaluation:** Any PHP code is executed after Markdown is processed. ### Whitespace & Markdown Structure + - **Definition List Syntax:** + ```markdown _(Label)_: : ``` + This is parsed into: + ```html
This will not be parsed as markdown.
+= "This is php shorthand echo without markdown parsing"; ?>
+= _("This is php shorthand echo with translation support and no markdown parsing"); ?>
+