refactor: rename chat_greeting() dismissible to persistent#263
Merged
Conversation
The `dismissible` parameter implied a user-closeable button that never existed. Renaming to `persistent` makes the behavior unambiguous: the greeting hides on activity by default (`persistent = FALSE/False`), or stays pinned when `persistent = TRUE/True`. Deprecation shims are in place for both R and Python so existing code using `dismissible` will warn rather than break. The polarity is inverted: `dismissible = FALSE` (stay visible) → `persistent = TRUE`. Closes #260
…ting() - Correct version to 0.4.1 (was incorrectly set to 0.3.0; dismissible was introduced in 0.4.0) - Add @param ... roxygen entry with lifecycle badge documenting the deprecated dismissible argument - Add rlang::check_dots_empty() to catch unknown extra arguments
Move dismissible behind ... so it must be named, use lifecycle::deprecated() as the default and lifecycle::is_present() to detect use, and call check_dots_empty() to guard against unknown args.
Replace **kwargs approach with explicit dismissible: DEPRECATED_TYPE = DEPRECATED parameter in both ChatGreeting.__init__ and chat_greeting(), matching the existing pattern used elsewhere in the codebase.
…ng()
Move persistent behind ... so positional calls like chat_greeting('Hi', FALSE)
hit check_dots_empty() and error clearly rather than silently binding to the
wrong parameter.
Replace em dash in deprecation string with \u2014 escape and comment hyphens with ASCII. Add @importFrom shiny isolate for bare isolate() calls in chat_mod_server.
cpsievert
approved these changes
Jun 24, 2026
cpsievert
added a commit
that referenced
this pull request
Jun 25, 2026
Picks up the dismissible→persistent rename from origin/main (#263) into all dist/www copies after rebasing feat/chat-history onto main.
Collaborator
Author
|
FYI I incorrectly had shinychat throw if both |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #260
Summary
Renames the
dismissibleparameter onchat_greeting()topersistentacross the JS client, Python package, and R package. The old name implied a user-controlled close button that never existed — dismissal is entirely automatic.persistentis unambiguous:persistent = FALSE(the default) means the greeting hides on first activity;persistent = TRUEkeeps it visible throughout the conversation.Polarity is inverted from the old default:
dismissible = TRUE(hide) →persistent = FALSE(hide);dismissible = FALSE(stay) →persistent = TRUE(stay).Both R and Python include deprecation shims so existing code using
dismissiblewarns rather than breaks. In R,lifecycle::deprecate_warn("0.4.1", ...)is used withlifecycle::deprecated()as the sentinel default; in Python, the project's existingDEPRECATED/DEPRECATED_TYPEsentinel pattern is used. Bothpersistentanddismissibleare placed after.../*so they must be passed by name — positional calls will error with a clear message.The wire format key sent from R/Python to the JS component also changes from
"dismissible"to"persistent".Verification