-
Notifications
You must be signed in to change notification settings - Fork 333
Show warning when the user is not following anyone, therefore may not… #713
Conversation
… be able to see new context. Fixes ssbc#707.
|
Code looks pretty good! Gonna give this a try and see 👍 |
|
This seems to work! However, the warning could be a bit startling for a new user. Since this also serves as a welcome message, maybe this should provide links to a getting started guide? Do you have any thoughts @ahdinosaur? |
|
haha yes, I agree (with regards to it being startling.) By the way, I just moved the message under the 'write a public message' box so that it doesn't follow you as you scroll down =p. I could probably do with a hand with the phrasing of the warning box / a good link to put at the bottom of it, and eh.. less startling styling :P. |
|
I'll update the pull request with:
Let you know when it's updated :P. |
|
Is this any better? @mmckegg Front end stuff is not my strength. I'm trying though :P. The text is less intimidating. Do you think I should maybe go with a 'softer' colour scheme? Like the orange from the boxes on profiles warning you that someone might not be able to see your posts? |
|
👍, i like the iterations @Happy0 |
|
Thanks @ahdinosaur :). I'm thinking I should add a similar box to channels that the user views too. When I first used patchwork, I wasn't sure if channels were 'more public' or not. I later realised they followed the same friend-of-a-friend model. I suspect the user who unfollowed the pubs he joined that inspired this change ( %5TXFe2XWKvVOMWCelFF74a3t0OVhPkYi4HGpeMqSlpg=.sha256 ) might have thought he could 'lurk' and just view channels without friending anybody. Similarly, somebody who was onboarded over LAN will be able to see channels, but if they don't follow anybody they won't see new content on channels when they're off the LAN network. The channel box would have the text: ' You will not see any new content in this channel until you follow someone.' Do you think this is worth adding too? (cc: @mmckegg ) |
fe30165 to
88eda56
Compare
88eda56 to
72e27cc
Compare
locales/en.json
Outdated
| "Subscribed": "Subscribed", | ||
| "Write a message in this channel": "Write a message in this channel", | ||
| "mentioned this channel": "mentioned this channel", | ||
| "You are not Following Anyone": "You are not Following Anyone", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is "Following Anyone" capitalized?
modules/page/html/render/channel.js
Outdated
| h('h1', i18n('You are not Following Anyone')), | ||
| h('p', i18n('You may not be able to see new channel content until you follow some users or pubs.')), | ||
| h('p', [i18n("For help, see the 'Getting Started' guide at "), | ||
| h('a', {href: 'https://www.scuttlebutt.nz/'}, 'https://www.scuttlebutt.nz/')] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we want to link directly to the "Getting Started" page, it's now available at: https://scuttlebutt.nz/getting-started.html
| ] | ||
| } | ||
|
|
||
| function noVisibleNewPostsWarning() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is mostly repeated from modules/page/html/render/channel.js, is it possible (and desirable) to extract out the similar bits into a common module? same for the mcss, which could be a mixin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the time, and thought that trying to abstract it maybe didn't benefit us much because I'd just be replacing 'when' with another function call. However, now that you mention it, I notice that most of the HTML is shared too.
I guess the explanation of why the warning is being shown 'You won't see new public posts' or 'you won't see new channel posts' can be parameterised, which would make it more worthwhile.
Next time I work on the branch, I'll push something like:
`
function renderWarning(conditionObs, explanation) {
var content =
h('div', {classList: 'NotFollowingAnyoneWarning'}, h('section -notFollowingAnyoneWarning', [
h('h1', i18n('You are not Following Anyone')),
h('p', explanation)),
h('p', [i18n("For help, see the 'Getting Started' guide at "),
h('a', {href: 'https://scuttlebutt.nz/getting-started.html'}, 'https://scuttlebutt.nz/getting-started.html')]
),
]))
return when(conditionObs, content)
}`
I'll check out the mixin thing you linked me too =].
Cheers for the review :D.
|
@ahdinosaur I've created a new module ( I've also moved the shared code for rendering the warning to a Do these changes make sense to you? |
|
This is looking pretty good @Happy0! I will review in depth and (hopefully) merge it next time get around to doing some patchwork dev! Thanks @ahdinosaur for the code reviews! |
|
Cheers m80 |
|
Okay, merged! Will be in the next release 🎂 |
|
\o/ :D |




… be able to see new content. Fixes #707.