Falko Schindler 2 anni fa
parent
commit
040f43b984

+ 3 - 3
nicegui/elements/splitter.py

@@ -13,13 +13,13 @@ class Splitter(ValueElement):
         """Splitter
         """Splitter
 
 
         The `ui.splitter` element divides the screen space into resizable sections, 
         The `ui.splitter` element divides the screen space into resizable sections, 
-        allowing for flexible and responsive layouts in your applications.
+        allowing for flexible and responsive layouts in your application.
 
 
         Based on Quasar's Splitter component:
         Based on Quasar's Splitter component:
         `Splitter <https://quasar.dev/vue-components/splitter>`_
         `Splitter <https://quasar.dev/vue-components/splitter>`_
 
 
-        It provides three customizable slots: ``before``, ``after``, and ``separator``, which can be
-        used to embed other elements within the splitter.
+        It provides three customizable slots, ``before``, ``after``, and ``separator``,
+        which can be used to embed other elements within the splitter.
 
 
         :param horizontal: Whether to split horizontally instead of vertically
         :param horizontal: Whether to split horizontally instead of vertically
         :param limits: Two numbers representing the minimum and maximum split size of the two panels
         :param limits: Two numbers representing the minimum and maximum split size of the two panels

+ 2 - 2
nicegui/page.py

@@ -24,8 +24,8 @@ class page:
 
 
         Creates a new page at the given route.
         Creates a new page at the given route.
         Each user will see a new instance of the page.
         Each user will see a new instance of the page.
-        Which means it is private to the user and not shared with others 
-        (as it is done `when placing elements outside of a page decorator <https://nicegui.io/documentation#auto-index_page>`_).)
+        This means it is private to the user and not shared with others 
+        (as it is done `when placing elements outside of a page decorator <https://nicegui.io/documentation#auto-index_page>`_).
 
 
         :param path: route of the new page (path must start with '/')
         :param path: route of the new page (path must start with '/')
         :param title: optional page title
         :param title: optional page title

+ 3 - 1
tests/test_page.py

@@ -1,8 +1,10 @@
 import asyncio
 import asyncio
 from uuid import uuid4
 from uuid import uuid4
 
 
-from nicegui import Client, background_tasks, ui
 from fastapi.responses import PlainTextResponse
 from fastapi.responses import PlainTextResponse
+
+from nicegui import Client, background_tasks, ui
+
 from .screen import Screen
 from .screen import Screen
 
 
 
 

+ 4 - 6
website/more_documentation/splitter_documentation.py

@@ -6,10 +6,9 @@ from ..documentation_tools import text_demo
 def main_demo() -> None:
 def main_demo() -> None:
     with ui.splitter() as splitter:
     with ui.splitter() as splitter:
         with splitter.before:
         with splitter.before:
-            ui.label('This is some content on the left hand side.')
+            ui.label('This is some content on the left hand side.').classes('mr-2')
         with splitter.after:
         with splitter.after:
-            ui.label('This is some content on the right hand side.')\
-                .classes('ml-2')
+            ui.label('This is some content on the right hand side.').classes('ml-2')
 
 
 
 
 def more() -> None:
 def more() -> None:
@@ -21,10 +20,9 @@ def more() -> None:
                          on_change=lambda e: ui.notify(e.value)) as splitter:
                          on_change=lambda e: ui.notify(e.value)) as splitter:
             ui.tooltip('This is the default slot.').classes('bg-green')
             ui.tooltip('This is the default slot.').classes('bg-green')
             with splitter.before:
             with splitter.before:
-                ui.label('This is the left hand side.')
+                ui.label('This is the left hand side.').classes('mr-2')
             with splitter.after:
             with splitter.after:
-                ui.label('This is the right hand side.') \
-                    .classes('ml-2')
+                ui.label('This is the right hand side.').classes('ml-2')
             with splitter.separator:
             with splitter.separator:
                 ui.icon('lightbulb').classes('text-green')
                 ui.icon('lightbulb').classes('text-green')