Skip to content

chore: Update PATTERNS.md: change screens.push + pop to be used via Context#283

Open
marceloadsj wants to merge 2 commits into
subinium:mainfrom
marceloadsj:chore/fix-docs-new-screens-api-via-context
Open

chore: Update PATTERNS.md: change screens.push + pop to be used via Context#283
marceloadsj wants to merge 2 commits into
subinium:mainfrom
marceloadsj:chore/fix-docs-new-screens-api-via-context

Conversation

@marceloadsj

Copy link
Copy Markdown

What

Complement the changes that fixed issue: #279

Updating PATTERNS.md doc to make use of the ui.push_screen() + ui.pop_screen() in the example where ui.screen() is being used as well.

Why

To make sure the sample code shown in the docs compile without errors.

Checklist

Required

  • cargo fmt -- --check passes
  • cargo check --all-features passes
  • cargo clippy --all-features -- -D warnings passes
  • cargo test --all-features passes
  • cargo check --examples --all-features passes

Public API Changes

  • New public items have doc comments (///)
  • Widget follows the Response pattern
  • State struct in widgets.rs, impl on Context, re-export in lib.rs
  • Breaking change? Update CHANGELOG.md and note it here

If Adding a Widget

  • Calls register_focusable() if interactive
  • Consumes handled key events
  • Uses self.theme.* for default colors
  • Example added or existing example updated

If Applicable

  • Tests added
  • Animation uses build-time pre-sort (not per-frame)
  • No unwrap() in Result-returning functions

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.

1 participant