Giter VIP home page Giter VIP logo

feditext / feditext Goto Github PK

View Code? Open in Web Editor NEW

This project forked from metabolist/metatext

158.0 158.0 6.0 6.66 MB

A free, open-source iOS client for Mastodon, Glitch, GotoSocial, Iceshrimp, Akkoma, and other Mastodon-API-compatible Fediverse instance servers.

Home Page: https://mastodon.social/@Feditext

License: GNU General Public License v3.0

Swift 100.00%
activitypub akkoma glitch-soc gotosocial iceshrimp ios ios-swift mastodon

feditext's Introduction

Feditext

A free, open-source iOS client for Mastodon, Glitch, GoToSocial, Firefish, Akkoma, and other Mastodon-API-compatible Fediverse instance servers.

Feditext is based on the Metatext project, which has concluded and is no longer maintained. Feditext is updated with Mastodon 4 features and better support for non-Mastodon instances.

Testers Wanted

If you are interested in joining the TestFlight group, please DM our official Fedi account @[email protected], and follow it for announcements and release notes.

Contributing Bug Reports

GitHub is used for bug tracking. Search existing issues and create a new one if the issue is not yet tracked. Upstream issues can be referenced in the archived project.

Contributing Translations

Existing translations for Metatext are in a CrowdIn project. Translation contributions will be welcome again after some more project infrastructure is in place for Feditext.

Contributing Code

See the contribution guidelines.

Building

To build Feditext:

  • Clone the repository (git clone https://github.com/feditext/feditext.git)
  • Run git update-index --skip-worktree Identity.xcconfig to ignore changes to the ID file so you don't commit them
  • Change the development team ID and bundle ID base in Identity.xcconfig to your own

All dependencies are managed using Swift Package Manager and will automatically be installed by Xcode.

Push Notifications

Push notifications will not work in development builds of Feditext unless you host your own instance of feditext-apns and change the pushSubscriptionEndpointURL constants in IdentityService.swift to its URL.

There is an issue to track this: #15.

Architecture

  • Feditext uses the Model–view–viewmodel (MVVM) architectural pattern.
  • View models are clients of a service layer that abstracts network and local database logic.
  • Different levels of the architecture are in different local Swift Packages. import DB and import MastodonAPI should generally only be done within the ServiceLayer package, and import ServiceLayer only within the ViewModels package.

Acknowledgements

Feditext uses the following third-party libraries:

Feditext uses the following third-party artwork:

Feditext is maintained by:

And of course, we wouldn't be here without Metabolist's incredible work on the original Metatext project.

Cryptography Notice

This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See http://www.wassenaar.org/ for more information.

The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms. The form and manner of this distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code.

License

Copyright © 2022–2021 Metabolist Copyright © 2022–2023 Brian Dube, Vyr Cossont

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

feditext's People

Contributors

6a-62 avatar bdube avatar dvorakroth avatar elosha avatar grimneko avatar horaceyoung avatar jzzocc avatar kimar avatar maco avatar noellabo avatar prplecake avatar stephenradachy avatar stigger avatar vollkorntomate avatar vyrcossont avatar xabirequejo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

feditext's Issues

Language selector on posts

The Mastodon web UI has a language selector so you can set post language on a per-post basis (as well as the default in your preferences). We should add one as well. It should default to the user's default posting language as set in their Mastodon prefs, and if possible, pin the languages that the user has chosen to see posts in at the top of the language list.

Update About This App links

Issue tracker and project page should link here, we should add our own accounts as maintainers, and the original author and project should be credited while making it obvious that our users should not be bugging them.

Performance instrumentation

We might want to see some app stats:

  • app version
  • OS version
  • device size
  • connected instance flavor (Mastodon, Glitch, GtS, Akkoma, etc.) and version
  • language/locale
  • performance counters and gauges for specific things like loading new chunks of timeline, laying out status cells, database size, etc.
  • feature usage: is anyone using a specific feature? examples current and future: edit history, scheduled posts, video uploads, rich text editor, filters

These should be opt-in, anonymous, retained for a short period of time and/or only as aggregates, and any IDs should be trivially resettable. There's probably existing plumbing for this, either from Apple or third-party open source, but if we go third-party, it needs to be self-hosted.

Following hashtags

Mastodon's web UI and a few of the newer clients like Tusker and Ice Cubes allow following hashtags as well as users. They get dumped into the user's home timeline on vanilla Mastodon and Glitch, not sure about Hometown or GotoSocial. We should add UI for following/unfollowing hashtags as a first step, and then add a list of followed hashtags alongside standard timelines and list timelines.

Edit posts

Implement Mastodon 3.5 post editing.

Stretch: option to show previous versions and/or diffs of edited posts.

Filtered post is shown in timeline

I'm seeing a post in the timeline that I noticed was filtered in the web client due to muted words.

Before seeing this post in this client, I clicked the thing in the web client to show anyway--I wanted to see what triggered the filter.

I don't know if my allowing the post to display in the web client is why this client showed the post in the timeline.

This issue is to remind myself to investigate a little.

Note that the post I allowed to show in the web client was boosted by Tooter 1, and the post in this client was boosted by Tooter 2. So the same original post, but different "instances" of the tootpost in question.

Support server-side filtering

Mastodon 3.6 adds a v2 filter API to support server-side filtering, where the filters are matched on the server. They still need to be acted on visually by the client: statuses gain a filtered field containing a list of matching filters, and we can hide the status, or show a "filtered: for reasons:" placeholder (which doesn't exist in Feditext yet, AFAIK).

As of Mastodon 4, the v1 filter API is deprecated, and in any case, it uses the same filter storage as v2 filters, so that any filters I create using v1 APIs through Feditext show up in both APIs. I don't know what the supported filter APIs are on Hometown, GtS, or Akkoma.

Editing a post navigates backwards

Describe the bug
Editing a post navigates back out of the post to whatever timeline you were looking at before.

To Reproduce
Steps to reproduce the behavior:

  1. Click into a post.
  2. Edit it.

Expected behavior
It should work the same way as replying to a post.

Better Mac support

#28 adds Mac support through Catalyst, but uses the iPad idiom, which doesn't result in a very Mac-like application. Switching it to the Mac idiom will require a little work to replace things like pull-to-refresh that don't compile when the Mac idiom is used.

Add support for trend management

Is your feature request related to a problem? Please describe.
Trend management on mastodon is always a pain, the web ui is very cumbersome

Describe the solution you'd like
After adding support for Trending posts and News (#76), I’d like to see an alternative admin view of the explore tab that uses the admin api, and each post/link is marked if it has requires_review, and has approve/reject buttons (this would the mastodon server be running 4.2)

Describe alternatives you've considered
The only other option is to use the substandard admin ui on the web

Additional context
See my PR at mastodon/mastodon#24257

Admin domain blocking UI

Admins (or anyone with the privilege: we can get roles through the account API) should be able to manage domain blocks, from a new Admin tab (which would be the 5th tab), or on individual posts (a Limit/Suspend domain instance.tld menu item in the red section, which would switch to the Admin tab for this).

If we detect role support on the server (a 4.0 feature), we should also use it to show/hide the admin notifications tab accordingly, as regular users will never see those.

Notification timeline: fav/boost rollup

Multiple accounts faving or boosting the same post within a certain time window should be collapsed into a single display for that post, with fav and boost totals and a stack of account icons.

Get SwiftUI status body view up to par with UIKit

I created a SwiftUI version of post rendering for edit history views, and we might consider replacing UIKit components with it someday, but right now, it's not equivalent to StatusBodyView. Issues with it:

  • Links are underlined and the wrong color compared to the original
  • Paragraphs are too close together
  • Can't render emoji in CW or content
  • No media attachment support
  • No poll support
  • Can't fold CWed or long content
  • Can't select part of a post (can copy the entire text of a post, though)

This is not critical. Edit history is not a commonly used feature.

Rich text: doesn't render blockquote

Describe the bug
The Glitch web GUI renders blockquote tags with a left margin bar, like most email clients and many Markdown processors. However, since the default styles of the Foundation HTML parser don't do anything special with blockquote, neither do we, so blockquotes are lost, and this is a fairly important kind of markup for comprehension.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://demon.social/@vyr/109672832097775341 in Feditext

Expected behavior
This text should be indented and decorated with a left margin bar:

But I'd be lying if I said I haven't spent the past five years watching every Orange series with the overwhelming thought, 'please get back to [hurting me with rocks, already.'

Screenshots
desired behavior

(please complete the following information):

  • Device: iPhone 11 Pro Max
  • OS: iOS 16.x
  • App Version: TestFlight as of 2023-01-23

Additional context
We might be able to use the style + color hack currently used for span.ellipsis and span.invisible to pass through blockquote level as a color: the more blue it is, the more levels of quote-indent, or something. Nested quote support is necessary, although we don't really need to support more than say 4–8 levels.

If we can't render a pretty bar easily, we should insert an appropriate number of literal > characters so it's clear it's some sort of quote.

Option to use square avatars

Is your feature request related to a problem? Please describe.
Sometimes user avatars don’t look good when turned into circles

Describe the solution you'd like
I would like to see a preference option to leave avatars as squares

Describe alternatives you've considered
N/a

Additional context
From Feditext:
feditext
Vs. Web:
web ui

Rich text: red background in long bio links

Describe the bug
Unexpected red background in long bio links.

To Reproduce
Steps to reproduce the behavior:

  1. Find a bio with a link long enough for Mastodon to use the ellipsis and invisible classes on it.
  2. The full URL path will be displayed instead of being shortened with a and it will be red.

Expected behavior
The red background is used as an intermediate stage in HTML parsing and should not show up in the output NSAttributedString ever.

Screenshots
normal

buggy

Additional context
Reported by @bdube.

Rich text: doesn't render Glitch markdown strikethru

Describe the bug
Glitch renders ~~struck text~~ to HTML as the del tag. Fedtext doesn't render ins or del tags at all, because I forgot to safelist them.

To Reproduce

  1. Go to https://demon.social/@vyr/109742928289552104 in Feditext.

Expected behavior
The text "like subscribe and hit that bell" should be struck out. It isn't.

(please complete the following information):

  • Device: Intel MBP, iPhone 11 Pro Max
  • OS: macOS 13.x, iOS 16.x
  • App Version: TestFlight build effective as of 2023-01-23

Additional context
Can be fixed by safelisting the del tag. Might as well add ins as well (normally rendered as underlined, but I don't think Glitch Markdown ever generates it).

Follow hashtags

Is your feature request related to a problem? Please describe.
I'm always going to the web client to follow hashtags. Is this supported and I'm not seeing it?

Describe the solution you'd like
A workflow to follow hashtags like the web client.

New User Notifications unclear

Describe the bug
New user notifications are unclear. The show as:

Notification from NewUser
NewUser
@newuser

To Reproduce
Steps to reproduce the behavior:

  1. Create a new user account on your server
  2. Go to the notifications tab
  3. Go to Admin section
  4. See notification

Expected behavior
The notification text should match the webui and say “NewUser has signed up”

Screenshots
If applicable, add screenshots to help explain your problem.

(please complete the following information):

  • Device: iPhone 12 Pro
  • OS: iOS 16.5
  • App Version 1.7.2 (35)

Additional context
Add any other context about the problem here.

Localization

Upstream project had a Crowdin localization project. Crowdin and several other providers offer a free option to open source projects. Free tiers are vulnerable to discontinuation.

I would like to continue to support localization, and I think the project should remain in control of the assets.

Lists in tab bar or action bar

Lists are hard to get to right now. One way to fix this would be to allow users to pin them to the tab bar at the top of the Timelines tab along with Home, Local, and Federated. This would have limited room on iPhones (requiring scrolling) but work well with Macs and iPads.

Markdown authoring with preview

Glitch, GotoSocial, and Pleroma and its forks allow viewing posts that use more HTML than just @s and #s and links, as well as authoring posts in rich text formats that are translated to HTML, so far always including Markdown. (This isn't a feature in vanilla Mastodon.) They also have or will soon have a mechanism to determine whether the user's instance supports authoring posts in rich text formats, and also which formats it supports. In the case of Glitch and GtS, it's because I proposed the mechanism:

So for users on one of these instances, we should offer the user the choice of plain text or Markdown post authoring, and provide a Markdown editor with local preview (there's no API that I'm aware of for server-side preview), ideally something like the one in the Apollo Reddit client.

Scheduled posts

This is a two-part feature: posts can be scheduled using the post API with the scheduled_at parameter, and listed, re-scheduled, or deleted with their own API. They've been supported by Mastodon for half of forever, but I'm not sure if anyone actually uses them.

This might be a good medium-sized feature for someone who has already done a little UI and is adding a new persisted table for the first time.

Search/followers context

Use the familiar followers and profile APIs to show in search results:

  • first relevant verified profile link
  • whether you have any followers that also follow the account you're looking at

Also surface familiar followers info in the profile header view.

In progress.

Mute conversations

Mastodon has an API to mute a thread so that you stop getting notifications for it.

It doesn't hide posts from that thread, but maybe it should, and if it returns the muted attribute on subsequent posts, we could do that client-side. Doesn't look like there's a way to get a list of muted conversations, though, so it'd be impossible to undo. Maybe we should have our own client-side thread hiding?

Client-side timeline filtering

On your home, local, federated, and list timelines, it should be possible to filter by whether a post is a reply, boost, from a bot, etc. We'd need to do most of this client-side.

Iffy scroll performance

Describe the bug
Occasional hitches when scrolling the timeline, reported by multiple users

To Reproduce
Steps to reproduce the behavior:

  1. Scroll for a few seconds on any timeline
  2. Compare it to Ice Cubes or Apollo or some similar post-viewing app
  3. Happens on macOS builds too

Expected behavior
Scrolling should not have hitches/micro-hangs/whatever, as distinct from loading more content.

Screenshots
If applicable, add screenshots to help explain your problem.

(please complete the following information):

  • Device: any
  • OS: any
  • App Version: mainline Metatext and Feditext up to today's TestFlight build

Additional context
Did some very quick profiling, inconclusive but suspect table cell height estimates are inappropriately slow. We should be caching height calculations as much as possible, and trying to avoid layout or text layout work in them. Need to make sure that estimate path and actual height path are separate.

CWs are Indistinguishable from “folded” posts

Describe the bug
CW’d posts appear the same as Folded posts, making it unclear the the message displayed is a CW and not just part of the post

To Reproduce
Steps to reproduce the behavior:

  1. Find a CW’d post and a long post post that gets folded
  2. Observe they look the same

Expected behavior
A clear indication that the CW’d post has a CW not just folded

Screenshots
CW Post:
cw post

Folded Long Post:
folded long post

(please complete the following information):

  • Device: iPhone 12 Pro
  • OS: iOS 16.5
  • App Version 1.7.2 (38)

Additional context
Add any other context about the problem here.

Implement nodeinfo API

The nodeinfo API may let us detect the underlying implementation of the software where the instance API won't; for example, Akkoma's version through the instance API is something like 2.7.2 (compatible; Akkoma 3.5.0-0-gd9508474b), whereas GtS reports only 0.7.0-rc2 git-40bc03e, which will goof our version detection. Through nodeinfo, they report software.name of akkoma and gotosocial respectively.

We should try not to rely on version detection through either API, instead preferring explicit (instance API's configuration and sometimes pleroma sections) or implicit (calling a read-only API to see if it works) feature detection where possible, but the Mastodon C2S API wasn't really designed to make either easy.

We shouldn't rely on the presence of the nodeinfo API, since it's not part of either ActivityPub or the Mastodon C2S API, and some admins might disable it.

Update the instance filter

Metatext includes a filter that rejects attempts to log into to certain instances, for reasons. It's likely out of date and should be periodically updated in Feditext.

Native notification grouping

We want OS notifications to be optionally groupable the same way that in-app notifications are groupable for closely spaced follow notifications for the same account or fav/boost notifications for the same status (added in #56).

One way is to use threadIdentifier to ask the OS to visually group them. Another way might be to use delivered notification APIs to replace single notifications with summary notifications as more come in.

Inconsistent vertical layout with folded long posts

Describe the bug
Several issues introduced with long-post folding:

  1. Show More button is sometimes way too big or too small or missing entirely
  2. on the detail view for a folded post, there isn’t an obvious way to expand it. but once you expand it in the outer feed, then the detail view consistently shows the whole thing

  3. Posts may be unfolded when not the focal point of a thread but folded when they are (probably due to using a different font size for height calculations in each post)

To Reproduce
Steps to reproduce the behavior:

  1. on posts with an image:
  2. show more on the outer list
  3. drill into the post
  4. show less
  5. for posts with just text and a picture, the button goes away.
  6. but for posts that also have a CW, it’s the CW that disappears.

Expected behavior
Button and CW should not disappear.

Screenshots
app settings

button size issues

button too big

button too big showing media attachment

displaced Show More button

button/CW missing issues

button missing

CW missing

(please complete the following information):

  • Device: iPhone 12 Mini
  • OS: iOS 16.1 (20B82)
  • App Version: TestFlight as of 2023-01-23

Additional context
Reported by Vy in private thread, more repro at https://demon.social/@vyr/109741655992743250.

Add Trends and News to Explore

Is your feature request related to a problem? Please describe.
Explore tab is incomplete compared to web ui

Describe the solution you'd like
Please add trending posts and news to the Explore tab

Describe alternatives you've considered
N/a

Additional context
N/a

Rich text display: vertical margins are off for blockquotes, lists, and headers

example with all three

Blockquotes and headers have too much trailing vertical margin, blockquotes don't have enough leading, and lists don't have enough trailing. This sounds like a job for NSParagraphStyle.paragraphSpacing/.paragraphSpacingBefore.

If HTML to attributed string conversion gets much fussier, we may want to rip it out and replace it with HTML conversion to Apple Markdown and then to AttributedString, which we can probably do based on the SwiftSoup document tree. I suspect this will get us better styles with SwiftUI Text, given that Apple supports Markdown explicitly for the purpose of putting basic rich text in SwiftUI, but I have not tested it yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.