Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do-not-federate option #7

Closed
ghost opened this issue Apr 22, 2017 · 19 comments
Closed

do-not-federate option #7

ghost opened this issue Apr 22, 2017 · 19 comments
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Apr 22, 2017

the ability to mark a post of any privacy level to Not federate to other instances. this enables local-timeline-only posting, and allows other interesting interactions, like unlisted posts to only people you trust on a private instance that's just yr closest friends.

@ghost ghost added the enhance label Apr 22, 2017
@wolfteeth
Copy link

I love this idea.

@ekiru
Copy link

ekiru commented Jun 30, 2017

So, I've said I'll implement the user-facing side of this (server-side support for it, currently applied to all toots ending in the eye emoji, has already been implemented by @beatrix-bitrot ), and I've done a little work toward that. This comment is going to summarize some Discord discussions from earlier this week on how the UI for this should work and provide a checklist of things that have been and should be done to implement this feature.

The conversation in #design-input in the Discord included at least @Hoodiek and Alice (I don't know if they're on github/what their username here is so not @ ing them) and @beatrix-bitrot and covered what the UI should look like. We were initially looking at this mockup from the related tootsuite issue: https://github.com/tootsuite/mastodon/files/975229/Mastodon.Local.pdf . I think we decided to not use that approach: instead Hoodie suggested (and Alice agreed with) a button that would activate an Advanced Options menu which could include both the local-only/do-not-federate toggle and any other advanced post visibility/etc. features we might add. Hoodie's idea was for it to drop down from the bottom of the compose for like the visibility/privacy setting dropdown. I initially misunderstood that but was going to implement it initially that way for simplicity's sake because I didn't know how to do the thing I misunderstood that as.

(I haven't done as much work on this yet as I'd like for various distraction-related reasons.)

Steps for actually implementing this:

  • Add an ellipsis button to the compose form and a dropdown below it.
  • Make the Advanced Options dropdown actually drop down (my current plan is to crib stuff from the dropdown for post privacy level)
  • Optionally, extract out a React component for drop downs to be used by both this and the visibility setting.
  • Add a local-only toggle inside the Advanced Options dropdown.
  • [Edited to add:] Pass down which toggles should be active from the ComposeForm.
  • When a toot is posted with local-only toggled on, automatically end it in a 👁
  • [Edited to add:] Come up with a better way of indicating whether an option is on or not in the dropdown.
  • Optionally, modify the POST /api/v1/statuses endpoint to accept an additional field to mark local-only toots (in place of the eye). This would have the disadvantage of getting rid of the visible indication of a local-only toot that we currently have.
  • Optionally, if we do the previous thing, modify the UI to set that when the option is enabled instead of adding an eye.

I'm hoping to get the second bit done tonight, and then the rest of the non-optional bits tomorrow night or the following day. Please do comment, anyone, if you have objections, questions, comments, or concerns about this approach. Thus far everything's just going on in my local branch. I'll push a branch once things are further along.

@DJSundog
Copy link

I think this all sounds excellent, except for the last bits:

Optionally, modify the POST /api/v1/statuses endpoint to accept an additional field to mark local-only toots (in place of the eye).

While I dig the intention, at the very least this would need to be /api/v2/statuses in order have api versioning mean anything, and I would imagine we would want to avoid forking the api except in the most dire of situations.

@ekiru
Copy link

ekiru commented Jun 30, 2017

Would it? It is a backwards-compatible change. I don't remember what guarantees, if any, the docs make about API versioning, though. But it's a fair point that we may want to avoid gratuitously modifying the API.

@marrus-sh
Copy link
Member

If it's backwards-compatible then we don't need to switch to /api/v2, and just between you and me I've seen Masto implement non–backwards-compatible changes that still didn't bump up the API version number.

That said, if we're going to make our API have more and/or different endpoints than upstream, then we should probably provide a means for frontends to check what software they are talking to. Right now the Mastodon versioning is set in lib/mastodon/version.rb and available through the API from /api/v1/instances/, but GlitchSoc should perhaps use its own versioning scheme ? ?? ???

@wolfteeth
Copy link

wolfteeth commented Jun 30, 2017 via email

@DJSundog
Copy link

Yeah, I can see not bumping the version number since it is non-breaking.

Still not sure we want to fork the API from upstream in any real way but I won't object any further.

@marrus-sh
Copy link
Member

marrus-sh commented Jun 30, 2017

api/capabilities would be great (or we could just stick that information in api/instances) but I feel like it would require much better documentation and specification of features than Masto currently has.

Which is not to rule it out at all. But it might be more of a long-term goal.

@beatrix-bitrot
Copy link

my thoughts on this issue are as follows:

  • I dig the advanced options dropdown
  • I think refactoring it into its own component can/should have its own issue/PR after this one
  • Let's not modify the API for now (though I'm not against it, just want to keep these tasks small), and so stick with the eye, as silly as it is

thanks everyone for your input and @ekiru for your work on this~

@ekiru
Copy link

ekiru commented Jul 1, 2017

I have a branch at https://github.com/glitch-soc/mastodon/tree/feature/local-only-toot-ui that does most of this now! The big uncertainty is how to display enabled/disabled status. The branch currently does it in a not v. good way (@beatrix-bitrot was confused by it and also it's inconsistent with the privacy dropdown) involving border colors and stuff around the options.

@beatrix-bitrot
Copy link

@ekiru toggles good 👍

@nightpool
Copy link

minor, but these rounded corners are awkward:
image

@nightpool
Copy link

nightpool commented Jul 2, 2017

Honestly if I wanted to implement this, I would just make it a fifth privacy option. we've already got four of them....

this loses some flexibility, but I don't think it's a big deal in the long run.

@beatrix-bitrot
Copy link

@nightpool it's orthogonal to visibility tho and there's plans to further refactor the existing options

@ekiru
Copy link

ekiru commented Jul 3, 2017

oki, merging in master fixed the rounded corners (and also changed the button highlighting behavior???), and I made the advanced options button highlight whenever the option is enabled even if the dropdown is closed. I pushed all that to the branch and am about to create a PR for that branch.

@ekiru
Copy link

ekiru commented Jul 5, 2017

The PR was merged, but there's a few subordinate issues we've noticed (some code cleanliness/optimization concerns, some user-facing functionality ones) that still need to be fixed.

Some of those have issues or comments on the PR elsewhere but I'll just make a little checklist here to keep everyone apprised:

  • make replies to local-only toots automatically enable local-only
  • make the whole menu item toggle local-only and not just the little toggle switch
  • make a special toggle component that will be more efficient for the advanced options
  • rename changeComposeAdvancedOption to toggleComposeAdvancedOption
  • update the character counter to take account of the 👁 so that people are less likely to be confused by errors if they try to make 499/500 char local-only toots

@ekiru
Copy link

ekiru commented Jul 12, 2017

I did all those little tweaks now. not sure if there's anything else we wanna take care of here before we close this?

@beatrix-bitrot
Copy link

There's nothing I can think of since piggo has documented the feature already. I am closing it. Nicely done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants