- 
                Notifications
    
You must be signed in to change notification settings  - Fork 115
 
docs: docstring for core shiny.modules.ui and shiny.module.server #1974
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
          
     Merged
      
      
            cpsievert
  merged 22 commits into
  posit-dev:main
from
chendaniely:api-docs-module-ui-server
  
      
      
   
  Apr 29, 2025 
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            22 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      e81b10a
              
                docstring for core shiny.modules.ui and shiny.module.server
              
              
                chendaniely a577ab7
              
                add link to correspoing module function
              
              
                chendaniely 18d6d9c
              
                extra statement about ui function and id namespacing
              
              
                chendaniely efb815e
              
                remove no_example()
              
              
                chendaniely d8a9b94
              
                use @add_example(ex_dir="../api-examples/Module")
              
              
                chendaniely c39de9b
              
                move, edit, add examples for core module.py docs (with express example)
              
              
                chendaniely 8b5ac9f
              
                docstring for core shiny.modules.ui and shiny.module.server
              
              
                chendaniely 7babeea
              
                add link to correspoing module function
              
              
                chendaniely ec17f94
              
                extra statement about ui function and id namespacing
              
              
                chendaniely c901f4f
              
                remove no_example()
              
              
                chendaniely b78eef5
              
                use @add_example(ex_dir="../api-examples/Module")
              
              
                chendaniely 24cf775
              
                move, edit, add examples for core module.py docs (with express example)
              
              
                chendaniely 328de17
              
                add missing function import
              
              
                chendaniely 4c9f450
              
                api-examples/Module folder has core and express apps
              
              
                chendaniely 607cfb2
              
                docstring fixes
              
              
                chendaniely c86a827
              
                fix conflict
              
              
                chendaniely 572c992
              
                fix conflict
              
              
                chendaniely 0a985b2
              
                fix rendering issues and links
              
              
                chendaniely 7605f52
              
                Update shiny/module.py
              
              
                chendaniely 50f62b8
              
                Update shiny/module.py
              
              
                chendaniely 381764f
              
                Update shiny/api-examples/Module/app-express.py
              
              
                chendaniely 94a9024
              
                use :func: and :func: to show links
              
              
                chendaniely File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| from shiny import reactive | ||
| from shiny.express import module, render, ui | ||
| 
     | 
||
| 
     | 
||
| # ============================================================ | ||
| # Counter module | ||
| # ============================================================ | ||
| @module | ||
| def counter(input, output, session, label, starting_value: int = 0): | ||
| count = reactive.value(starting_value) | ||
| with ui.card(): | ||
| ui.h2(f"This is {label}") | ||
| ui.input_action_button("button", f"{label}") | ||
| 
     | 
||
| @render.text | ||
| def out(): | ||
| return f"Click count is {count()}" | ||
| 
     | 
||
| @reactive.effect | ||
| @reactive.event(input.button) | ||
| def _(): | ||
| count.set(count() + 1) | ||
| 
     | 
||
| 
     | 
||
| # ============================================================================= | ||
| # App that uses module | ||
| # ============================================================================= | ||
| counter("counter1", "Counter 1", starting_value=0) | ||
| ui.hr() | ||
| counter("counter2", "Counter 2", starting_value=0) | 
This file was deleted.
      
      Oops, something went wrong.
      
    
  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.