Skip to content
This repository was archived by the owner on Aug 11, 2024. It is now read-only.

Refine Petname UX - #688

Merged
bfollington merged 20 commits into
mainfrom
2023-06-06-petname-ux
Jun 13, 2023
Merged

Refine Petname UX#688
bfollington merged 20 commits into
mainfrom
2023-06-06-petname-ux

Conversation

@bfollington

@bfollington bfollington commented Jun 6, 2023

Copy link
Copy Markdown
Collaborator

Fixes #649
Fixes #613
Fixes #610
Fixes #611

Potentially resolves #615

  • If we are following a user, we need access to the name we follow them under
    • use a enum with payload for this
  • if we follow a user, show our @petname on the first line and full path on the second
    • except in our address book where there's only one name
  • Show "Maybe: " in profile header context
  • Use leaf name on first line in .unknown case, italics, no @
  • Own profile name should count as .known

Demo

Screen.Recording.2023-06-08.at.10.58.16.am.mov

@bfollington
bfollington marked this pull request as draft June 6, 2023 06:35
@bfollington
bfollington force-pushed the 2023-06-06-petname-ux branch 2 times, most recently from e9a4ac1 to 1f43055 Compare June 7, 2023 07:34
Comment thread xcode/Subconscious/Shared/Components/Common/Byline/PetnameView.swift Outdated
Comment thread xcode/Subconscious/Shared/Components/Common/Byline/PetnameView.swift Outdated
Comment thread xcode/Subconscious/Shared/Components/Common/Byline/PetnameView.swift Outdated
Comment on lines 107 to 108

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant, we can just refresh the profile

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to be able to change this field to achieve #613

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm mildly wary of mixed mutation semantics (confusing), and try to go either all immutable or all mutable.

  • Should we just var everything? (Are there interdependencies among fields?)
  • Alternatively, could we make a "copy" method that changes this one field and constructs a new struct?

Non-blocking. Just a thought.

Comment thread xcode/Subconscious/Shared/Components/Detail/UserProfileDetailView.swift Outdated
Comment thread xcode/Subconscious/Shared/Components/Detail/UserProfileDetailView.swift Outdated
Comment thread xcode/Subconscious/Shared/Components/Detail/UserProfileDetailView.swift Outdated
Comment thread xcode/Subconscious/Shared/Services/UserProfileService.swift Outdated
@bfollington
bfollington marked this pull request as ready for review June 8, 2023 02:33
@bfollington
bfollington requested a review from gordonbrander June 8, 2023 02:33
@bfollington bfollington changed the title Prototype proposed petname UX Refine Petname UX Jun 9, 2023
@bfollington bfollington added Enhancement New feature or request Design labels Jun 9, 2023

@gordonbrander gordonbrander left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few small questions + comments

Comment thread xcode/Subconscious/Shared/Components/Common/Byline/PetnameView.swift Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might consider type names that map directly to concepts from one of the petname papers? https://spritely.institute/static/papers/petnames.html

  • petname (following directly)
  • selfNickname or autonym or selfProposedName (the nickname a sphere proposes for itself in its header)
  • nickname or proposedName (The nickname a 3p proposes for another sphere. This is the petname that sphere gives another sphere.)

@bfollington bfollington Jun 12, 2023

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is better. I dropped the unknown case & reworked the mapping API introducing UserProfile.toNameVariant() which can hold all the logic about this mapping.

Comment thread xcode/Subconscious/Shared/Components/Common/Byline/PetnameView.swift Outdated
Comment thread xcode/Subconscious/Shared/Components/Common/Byline/PetnameView.swift Outdated
Comment thread xcode/Subconscious/Shared/Components/Common/Profile/UserProfileHeaderView.swift Outdated
Comment thread xcode/Subconscious/Shared/Models/Slashlink.swift Outdated
@gordonbrander

Copy link
Copy Markdown
Collaborator

I think we can say this fixes #615. If we decide we need further refinement, we can always re-open.

Comment on lines 18 to 23

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't find a specific recommendation in the google swift styleguide for formatting long switch tuples like this, so this is a best guess.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me

Comment on lines 282 to 297

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gordonbrander gordonbrander left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment on lines 18 to 23

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm mildly wary of mixed mutation semantics (confusing), and try to go either all immutable or all mutable.

  • Should we just var everything? (Are there interdependencies among fields?)
  • Alternatively, could we make a "copy" method that changes this one field and constructs a new struct?

Non-blocking. Just a thought.

@bfollington
bfollington force-pushed the 2023-06-06-petname-ux branch from 8751ed4 to 8707a87 Compare June 13, 2023 00:44
@bfollington
bfollington merged commit d683818 into main Jun 13, 2023
@bfollington
bfollington deleted the 2023-06-06-petname-ux branch June 13, 2023 01:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Design Enhancement New feature or request

Projects

None yet

2 participants