From 4bf3ab6c58a7e1d53552a14060128ae44bff1721 Mon Sep 17 00:00:00 2001 From: RachelRadford21 <54749071+RachelRadford21@users.noreply.github.com> Date: Mon, 11 Mar 2024 12:40:49 -0400 Subject: [PATCH] [PBIOS-292] User Presence Docs (#3200) **What does this PR do?** A clear and concise description with your runway ticket url. [PBIOS-292] User Presence Docs **Screenshots:** Screenshots to visualize your addition/change **How to test?** Steps to confirm the desired behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See addition/change #### Checklist: - [x] **LABELS** Add a label: `enhancement`, `bug`, `improvement`, `new kit`, `deprecated`, or `breaking`. See [Changelog & Labels](https://github.com/powerhome/playbook/wiki/Changelog-&-Labels) for details. - [x] **DEPLOY** I have added the `milano` label to show I'm ready for a review. - [x] **TESTS** I have added test coverage to my code. --------- Co-authored-by: Jason Cypret Co-authored-by: Colin Lewis <112719604+co1in-1ewis@users.noreply.github.com> --- .../docs/_user_presence_indicator_swift.md | 30 +++++++++++++++++++ .../pb_user/docs/_user_props_table.md | 3 +- .../pb_kits/playbook/pb_user/docs/example.yml | 1 + 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 playbook/app/pb_kits/playbook/pb_user/docs/_user_presence_indicator_swift.md diff --git a/playbook/app/pb_kits/playbook/pb_user/docs/_user_presence_indicator_swift.md b/playbook/app/pb_kits/playbook/pb_user/docs/_user_presence_indicator_swift.md new file mode 100644 index 0000000000..60259833e9 --- /dev/null +++ b/playbook/app/pb_kits/playbook/pb_user/docs/_user_presence_indicator_swift.md @@ -0,0 +1,30 @@ +![user-presence-indicator)](https://github.com/powerhome/playbook/assets/112719604/96ee8408-2e21-4aaf-ae65-9f023515cf8d) + +```swift +VStack(alignment: .leading, spacing: Spacing.small) { + PBUser( + name: name, + + image: img, + size: .small, + territory: "PHL", + title: title, + status: .online + ) + PBUser( + name: name, + image: img, + territory: "PHL", + title: title, + status: .away + ) + PBUser( + name: name, + image: img, + size: .large, + territory: "PHL", + title: title, + status: .offline + ) +} +``` diff --git a/playbook/app/pb_kits/playbook/pb_user/docs/_user_props_table.md b/playbook/app/pb_kits/playbook/pb_user/docs/_user_props_table.md index d29ae588af..1560945d82 100644 --- a/playbook/app/pb_kits/playbook/pb_user/docs/_user_props_table.md +++ b/playbook/app/pb_kits/playbook/pb_user/docs/_user_props_table.md @@ -7,4 +7,5 @@ | **orientation** | `Orientation` | Changes the orientation of the User | `.horizontal` | `.horizontal` `.verticle` | | **size** | `UserAvatarSize` | Changes the size of the User | `.medium` | `.small` `.medium` `.large` | | **territory** | `String` | Adds the User's territory | | | -| **title** | `String` | Adds a title | | | \ No newline at end of file +| **title** | `String` | Adds a title | | | +| **status** | `PBAvatar.PresenceStatus?` | An idicator for the current status of the user | `.none` | `.online` `.away` `.offline` | diff --git a/playbook/app/pb_kits/playbook/pb_user/docs/example.yml b/playbook/app/pb_kits/playbook/pb_user/docs/example.yml index e8efb9fec7..0eb9a28d65 100644 --- a/playbook/app/pb_kits/playbook/pb_user/docs/example.yml +++ b/playbook/app/pb_kits/playbook/pb_user/docs/example.yml @@ -23,4 +23,5 @@ examples: - user_vertical_size_swift: Vertical - user_text_only_swift: Text Only - user_size_swift: Horizontal Size + - user_presence_indicator_swift: Presence Indicator - user_props_table: ""