Design/UX #17385: Profile CV & Account Settings
CV Editing and Publishing
Sara is going to post her latest mockups here for the Draft / Save Draft / Publish flow we've been talking about for CVs, including other elements of the publishing and editing sequence. This will be the handover we discussed to begin development while Sara is away through April.
Jeremy especially, let's use this subtask of the main Profile / Settings ticket #17385 to track our progress on this.
Updated by Sara Cannon 3 months ago
Here is the figma preview with notes: https://www.figma.com/proto/0Ke5bCwheE5SXXkT6wDd2l/CUNY-Design---Spring-2023?page-id=2888%3A56943&node-id=2889%3A67871&viewport=3501%2C4218%2C0.13&scaling=min-zoom
Figma File: https://www.figma.com/file/0Ke5bCwheE5SXXkT6wDd2l/CUNY-Design---Spring-2023?node-id=2889%3A67871&t=XWgsAZxeuhM6qvfX-1
Updated by Jeremy Felt 2 months ago
I'm feeling good about how the structure of the editor is working and my next step is to have it actually load on a view like https://commons.test/members/jeremyfelt/, which is powered by CAC Advanced Profiles on top of BuddyPress.Boone / Ray: Does it make sense to:
- Override the template provided in CAC Advanced Profiles
- Remove CAC Advanced Profile's handling of that entirely and override BuddyPress's template
- Something else?
I'm not familiar enough with CAC Advanced Profiles to know if we'll still need it alongside the new profile information. My gut says removing it would be too much, but I'll lean on you all. :)
Updated by Boone Gorges 2 months ago
Remove CAC Advanced Profile's handling of that entirely and override BuddyPress's template
Let's do this. The point of CAC Advanced Profiles was (a) to provide richer profile field types, such as "positions", and (b) to provide a front-end interface for editing these new field types and other BP profile fields. Your work will supersede (b), and we can do most of (a) without needing the infrastructure of CAC Advanced Profiles. (Some of the old data can be migrated to something that makes sense in the context of the block editor, while certain structure data like Positions might need a kind of middleware. I will help when we get to this point). But for the purposes of the profile template, we should simply remove CAC Advanced Profiles from the view and instead override the BP template.
Updated by Raymond Hoh 2 months ago
But for the purposes of the profile template, we should simply remove CAC Advanced Profiles from the view and instead override the BP template.
Agreed. I came across the same thing while implementing the Commons Profile pages. See the bottom of https://redmine.gc.cuny.edu/issues/17769#change-78240.
I didn't want to interrupt how CACAP functioned for the time being, so I disabled how CAC Advanced Profiles overrides the top-level template on Commons Profile pages here: https://github.com/cuny-academic-commons/cac/commit/9b850f33c479ac717b23f639e2b0e960d7b024f2. I specifically disable a case for the Public CV page when determining if we're on a Commons Profile page, but that conditional can be changed if needed: https://github.com/cuny-academic-commons/cac/commit/7fde1a58f765f5568da0214409e5c13554a5e59f#diff-1dfbefc79e2aec9ba9f6839552b623339738cfb8a363fa2da2aff9703244b11dR247
Updated by Jeremy Felt about 2 months ago
I've pushed an initial draft of the CV editor in feature/17768-cv-editor, which I've branched from Ray's feature/17769-commons-profile as there are a couple pieces that are intertwined.
Some initial notes:
- I've identified members/single/home.php as the place for the profile/editor to appear. I had this mostly working on authenticated and non-authenticated views, but I think Ray's improvements also made some changes there. Is there a different template to override for non-authenticated views or is one of the conditionals overriding CACAP not correct? My awareness of BP views is thin, so I'm hoping Ray spots the issue as soon as he sees it. :)
- I've left in a very rudimentary way of (1) loading a CV post belonging to the user if it's available and (2) if not, automatically creating an empty CV post and assigning it to the user. It may be that we don't want to auto-create placeholders. I think the next step here is getting some of the buttons/actions flowing properly between the views.
- Save draft doesn't work, but publish does: even though it doesn't provide great feedback now.
I'm sure I'm forgetting a note, but I'll follow up with some more detail.
Updated by Raymond Hoh about 2 months ago
Is there a different template to override for non-authenticated views or is one of the conditionals overriding CACAP not correct? My awareness of BP views is thin, so I'm hoping Ray spots the issue as soon as he sees it. :)
Thanks for your work on this, Jeremy! I did a partial cherry-pick of your commit to https://github.com/cuny-academic-commons/cac/commit/bfa3661fbcc4d5aa86c6da8800b42d1e2f5b3e08 in the
feature/17769-commons-profile branch. Unfortunately, I lost your author commit when I did this. Apologies!
To get something working for now, I've placed the Public CV functionality at the root of a member's URL. For example,
/members/admin/. This is accomplished with the
index-action-public.php BuddyPress template. (See the BuddyPress template hierarchy codex page for more info -- https://codex.buddypress.org/themes/theme-compatibility-1-7/template-hierarchy/#overview-of-template-hierarchy-in-buddypress .) If a displayed user's CV is empty, we redirect away from the root member's URL to their Activity page (
/members/admin/activity/). See https://github.com/cuny-academic-commons/cac/commit/1536511a07abec420f4d1c7289efc74d7e4ed02a for full details.
Work can continue in the
feature/17769-commons-profile branch. This is also available for testing on cdev.
Updated by Jeremy Felt about 1 month ago
Thank you, Ray!
One thing that I'd like to establish is when a CV post is created. There may be value in creating the post on user registration so that
members/username/ is populated with a basic block template. However, if we're redirecting to the activity page, then creating the post on demand could work as well.
A handful of next step notes that I'm going to start marching through.
members/username/, unauthenticated or not authenticated as the user:
- If a CV post is populated and published, display.
- If not, redirect to
members/username/, authenticated as the user:
- If a CV post exists, present it in the front-end editor interface.
- If not, create a CV post and present a template in the front-end editor interface.
- When the CV is a draft, options for "Save draft" and "Publish" are available.
- When the CV is published, options for "Switch to Draft" and "Update" are available.
- When a draft has been saved, display a message above the editor.
- When a draft has been published, display a message above the editor.
- A context aware profile action block:
- When unauthenticated "View Commons Activity"
- When authenticated as another user: "Add Friend", "Send Message", "View Commons Activity"
- When authenticated as the user: "View Commons Activity", "View Account Settings"
- Active timestamp block: "Active 20 hrs 3 min ago"
- This may be a combination of the CUNY shortlink and active timestamp.
- Pronouns block
Updated by Colin McDonald about 1 month ago
Hi Jeremy, your first two bullets here seem to align with the URL discussion from #17769 and what we were all thinking as far as showing the CV post at /username/ if it exists and is published, and redirecting to /username/activity/ if not.
For your next two bullets, I'm not as sure what you're saying one will see if going to /username/ while logged in as that same user. It seems to me that you should see the same thing at first that anyone else would see, then get into the editor interface if you click an Edit button. I'm also not sure about when a CV post is being created unless you choose to do so.
The other bullets for the interface and blocks all look good to me.
I spent a little time today playing around with the editing interface. I believe I was able to Publish, then make changes and have them saved on my published CV, but it's just all unformatted text right now. I assume that once we get going with different blocks there will be more options for putting a formatted CV together.
Updated by Jeremy Felt about 1 month ago
I've updated the
feature/17769-commons-profile branch with improved handling of the Save Draft / Publish buttons.
These two bullets are now resolved:
When the CV is a draft, options for "Save draft" and "Publish" are available.
When the CV is published, options for "Switch to Draft" and "Update" are available.
I'm also not sure about when a CV post is being created unless you choose to do so.
Thanks for taking a look, Colin. I think you're right. It's probably safer to not automatically create profiles until someone is ready to do so.
I'll get the messages above the editor connected tomorrow morning and then build that "context aware profile action block". I think this will help us dial in how it feels to go back and forth between the various screens.
Updated by Jeremy Felt 27 days ago
I've pushed a handful of changes to the
feature/17769-commons-profile branch. Boone / Ray - could one of you please pull that branch over to CDEV?
- On page load, no notice is shown.
- On save draft or switch to draft, "Your CV Draft is saved. Publish to make live" is shown.
- On publish or update, "Your CV is published" is shown.
- Clicking the "X" icon dismisses the notice until the next save action occurs.
One thing we should think through some more is the navigation to "My Account Settings". Right now it is displayed as a link in the notice above the editor only when the editor is saved. Sara's intent may have been that the "View Account Settings" button within the editor could also be used for navigation, but I'm not sure if we want those links clickable. If so, we probably need to display a confirmation message if unsaved content exists.
I'll create an initial skeleton for a Profile Action block as it's a relatively simple context-aware list of links and is probably the most helpful in determining how navigation is feeling:
- If logged in and editing CV, "View Commons Activity" and "View Account Settings"
- If logged in on someone else's CV, "Add Friend", "Send Message", and "View Commons Activity"
- If logged out, "View Commons Activity"
Updated by Raymond Hoh 27 days ago
Boone / Ray - could one of you please pull that branch over to CDEV?
Thanks for the work so far, Jeremy! I've tested the notice changes and they seem to work fine with an administrator account. However, when logged in as a regular user with the
subscriber role, there are REST permission errors when attempting to save the CV. Sounds like we just need to pass the appropriate permission caps for the authenticated user. Can you take a look?
Updated by Boone Gorges 21 days ago
- Related to Feature #18192: CV "top" section added
Updated by Boone Gorges 21 days ago
- Related to Feature #18193: CV "bottom" section added
Updated by Boone Gorges 21 days ago
- Related to Feature #18194: Migration routine for CVs added