Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Conversation

@sarahzinger
Copy link
Contributor

@sarahzinger sarahzinger commented Dec 3, 2019

Adds back dividers between result items in a results list and takes an optional private prop that will give it a yellow background.
Screen Shot 2019-12-03 at 4 37 38 PM

remix: https://peppered-deltadromeus.glitch.me/#StoryResultsList

Copy link
Contributor

@ehmorris ehmorris left a comment

Choose a reason for hiding this comment

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

This looks good to me but maybe we should add a lock icon to private rowitems while we're here:

Screen Shot 2019-12-03 at 4 49 25 PM

@sarahzinger
Copy link
Contributor Author

@ehmorris sounds good, now that I think about it, it's probs necessary to have something like that for accessibility stuffs, would you rather have a lock icon instead of the yellow backgrounds or in addition to?

@ehmorris
Copy link
Contributor

ehmorris commented Dec 3, 2019

@sarahzinger I think it would be best to do both.

@sarahzinger
Copy link
Contributor Author

so I'm playing around with this a bit and got a little icon to show conditionally:
https://peppered-deltadromeus.glitch.me/#StoryResultsList

Screen Shot 2019-12-04 at 10 48 35 AM

But I see now that lock icon is not placed according to your design up above, in relation to the proiect avatar.

I'm not sure we can dictate where the private icon is located there unless we also make ResultItem aware that it might have an avatar inside of it.

Right now ResultItems are sort of unaware of whats (projects/collections/anything?) inside them, I think purposely so. Should ResultItems always have an avatar? Sometimes have an avatar? I could make another version of ResultItem that is like ResultItemWithAvatar or something? Or we could say that shared-components shouldn't know what these things are being used for, and let the consumers of the shared-components library dictate when and how to show avatars and lock icons?

Idk what do you think @ehmorris

@ehmorris
Copy link
Contributor

ehmorris commented Dec 4, 2019

@sarahzinger The image I posted is just a screenshot from the editor, from "Switch Projects". I think we should implement something like ResultItemWithAvatar later, when we come to it, and release what you've done here now. The only change I'd make is to nudge the icon rightwards a bit, so it's centered between the edge of the box and the text, like this:

Screen Shot 2019-12-04 at 11 09 17 AM

@sarahzinger
Copy link
Contributor Author

yeah hmm the more I think about this the more I realize this is a somewhat interesting problem as we're already "there" in the community site :) for example, right now we show avatars for My Stuff collections in ResultItems:
Screen Shot 2019-12-04 at 11 12 24 AM
I'm wondering how this would work/not work when My Stuff is private which is the default. I think it'd be helpful to either decide what we want these thingys to look like across the site and build that widget OR keep this fairly flexible and unopinionated and let consumers of the lib decide (could have examples of how to do it in the docs maybe?)

@ehmorris
Copy link
Contributor

ehmorris commented Dec 4, 2019

@sarahzinger Maybe a way around this for now is to place the lock icon inline with the title, to avoid competing with whatever icon is rendered in the left column. This could be added through a new generic field like titleIcon.

@sarahzinger
Copy link
Contributor Author

cool, how about this? We add the privacy icon to ResultName and I show how to do it in the docs

Screen Shot 2019-12-04 at 11 58 24 AM

Screen Shot 2019-12-04 at 12 00 54 PM

Copy link
Contributor

@ehmorris ehmorris left a comment

Choose a reason for hiding this comment

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

That seems good to me!

@sarahzinger sarahzinger merged commit 7ba9bda into master Dec 5, 2019
@sarahzinger sarahzinger deleted the peppered-deltadromeus branch December 5, 2019 15:30
@keithk
Copy link
Contributor

keithk commented Nov 10, 2020

🚀 PR was released in v0.19.0 🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants