Giter Site home page Giter Site logo

mock-foundation / moc Goto Github PK

View Code? Open in Web Editor NEW
119.0 4.0 6.0 42.64 MB

A (really) native and powerful macOS and iPadOS Telegram client, optimized for moderating large communities and personal use. Currently in alpha

License: GNU General Public License v3.0

Swift 99.86% Shell 0.14%
telegram tdlib swift swiftui macos ipados

moc's Issues

Login UI

Currently the login UI is in bare-bones state. It should be fully implemented

Fix chat info in inspector

Also this issue will have a task for being able to open chat info not from an inspector, but by clicking on the chat title in toolbar

Possibly replace List with NSTableView wrapper

The reason for this change is simple: performance (and swipe actions)

Performance can be easily demonstrated here: https://kean.blog/post/not-list

And with swipe actions, they are available only on three-column NavigationView layout(idk why lol), but I don't have a NavigationView, it is replaced by a custom solution, so I lack swipe actions

Only benefits my people, only benefits

I think it will be implemented in 0.2.0 milestone release

add to brew ?

do you have plans to add moc to brew.sh ? presumably a bit further in development, do you have a mvp ?

Crash on Moc's session being remotely terminated

When Moc is running, and its session was terminated by another device, it just outright crashes

Reason

The reason is the handling of AuthorizationState.closed state and the reinstantiation of the TDLib instance, which, as we see, fails miserably.

Improve the code field design

I have found a really cool implementation of the 2FA field in RobotsAndPencils/XcodesApp, which looks similar to how 2FA works in Apple apps and also Telegram's official clients.

I will just steal I mean borrow some code from that repo, and tweak it a little so it looks cool

And obviously place credits to @RobotsAndPencils, because it will just be nice to do that

Unable to send messages with line breaks

If I type Ctrl+Return, it will look like I added a line break, but when sending the message, there are no line breaks, which is strange

Anyways, it should be fixed

How can I fix an extraction error with Swiftgram's TDLib framework during build?

Discussed in #37

Originally posted by S0ulf3re January 26, 2022
I really want to try and help contribute this project because I personally don't like the default telegram client for Mac and I've been trying to learn swift ever since July of last year. I tried opening the project, but I got an error which has caused a bunch of other build time errors to occur. How can I fix all this?

Here's a log from Xcode
Resolve Packages_2022-01-26T12-44-01.txt


This should be fixed ASAP

Implement better architecture

Let's use Resolver library to it's final potential, shall we?
Direct tdApi calls in views are not good, in fact, it really bad. How it should be replaced:

Example: we have a chat view. It should show messages, and populate the status bar and other things.
For that, there should be a variable:

@Injected private var dataSource: ChatDataSourcable

Where ChatDataSourcable is:

protocol ChatDataSourcable

Why? Simple: Previews and testing!
We can easily create something like:

final class TdChatDataSource: ChatDataSourcable

Which will have a real implementation with real data, and also:

final class MockChatDataSource: ChatDataSourcable

For using in Previews and testing.
Each instance can be easily injected using:

Resolver.register { TdChatDataSource() as ChatDataSourcable }

I think benefits are huge for this one :D

Fully implement logic process

Thing that are needed to be done are request for an SMS for the code, get code using a phone call, and other stuff

Login view is not opening when the session was terminated remotely

Explanation

When you terminate Moc's session from another device, the login view will be not shown.

Cause

The only update that triggers the login screen is authorizarionStateWaitPhoneNumber. When session terminates, a authorizationStateClosed update is sent. So, we need to handle that state too, to make it work.

Basic chat UI

A user interface for viewing chats, with abilities to:

  • Render messages from recipients and from me the right way(for e.g. blue bubbles from me and grey from recipients)
  • Show recipient photo
  • For other messages display the "Not supported" message
  • Sidebar with inspector

Add user id color tint for replies

Currently, they are always blue, but in official clients (at least on iOS) it's also colored the same way as message sender names and profile image placeholders, so that should be in Moc

Settings menu

A settings menu should be the same as in other native apps, like Xcode, Messages(formerly known as iMessage), Music, and others: a button in menubar under the app name called "Settings", which creates a window with setting categories on top in toolbar as tabs, and window automatically resizing on change of selected setting category.

Reserved for 0.2.0 milestone. Possibly will be transferred to 0.1.0

Add some test coverage

At least partial test coverage will definitely help in development, so I can spot bugs before they end up in a release build

And I also need to learn how to do UI tests with SwiftUI

This will not get tied to a specific milestone or something, it's just a task to do

Related

#90
#93

Update TDLib to it's latest version

This task includes replacing Swiftgram's distribution of TDLibKit with Mock Foundation's, and a lot of code updates for new API changes, like the new updateStream API.

Migrate from custom Message models to TDLib ones

Why? Well, it will result in better performance, because the message content loading will be done by MessageView lazily (thanks to LazyVStack), compared to how it is now when all messages are loaded when a user opens a chat. Pretty good reasons to do so tbh

App crashes when trying to display certain messages

Culprit: Media thumbnail generation. It uses the file extension to determine the file type, and then go next, but it's not a viable way to do this, it should instead look at the MIME type of the file, or at least handle the nil when making an instance of UTType from the path extension

Rework how the UI works

IMO, views in SwiftUI should be done like components, so they can be easily reusable in any place, which currently is not how things work. I mean yes, there is MessageView, where you just give it a Message instance, and it renders the message, except it doesn't, it doesn't only make a message, it also adds specific padding to it so it can only be used inside of ChatView, which is definitely bad, ChatView should do that instead.

So yes, views should be rewritten drastically, to make the code more maintainable and reusable.

This task can be done in Stage 2, but can be delayed to Stage 3, just because of it's sheer size.

Create a custom About screen

This feature will possibly be available only for macOS Ventura, because of the new Window APIs that were introduced there

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.