This repository has been archived by the owner on Apr 19, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
🚧 Merge updated Starlight code into main branch #17
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added [mergepbx](https://github.com/simonwagner/mergepbx) as merge tool for avoiding xcode project conflicts and making it easier to merge, stash changes, and move between branches.
After a long discussion in our discord server, we have decided that we will be focusing mainly on developing Starlight for the latest versions of iOS and macOS.
Chica will be the new backend for Starlight for all connections handled. No changes to the codebase have been made yet to accommodate for this, but future commits should hold up with Chica. 🌟🎸
A new LoginView has been added which contains the view for getting a user's domain, which should open the OAuth page respectively. The starlight URI scheme has also been registered. Further commits will need to register the application and properly deep link the OAuth to store the token correctly as per the documentation.
This commit also adds a startAuthFlow func to LoginView to get the information necessary. The StarlightApp struct also now handles URLs with Chica.handleURL. It has yet to be determined how we can tell if a user is logged in or not.
In ContentView, the login page is only displayed if Chica's OAuth state is signed out. The login page now more closely resembles the mockups from the SwiftUI channel.
Chica already handles this when calling OAuth.startOAuthFlow.
…to current architectures.
This commit adds Localizable.strings so that we can start programming for localization in mind, rather than after the fact. The login view and compact layout have been updated with this in mind.
This should hopefully remove bugs. Signed-off-by: Marquis Kurt <[email protected]>
This is still a work in progress, but this component is to emulate what is seen in the iOS Settings App.
The ProfileImage struct will be the basis for fetching the current user's profile image from Mastodon. Additionally, a new extension method has been introduced to convert a String with emoji shortcodes into Markdown with embedded images from a Mastodon server.
Some minor tweaks to the mockup Settings page and ProfileImage.
It also appears that Section is not properly translating content. This may be a bug in SwiftUI, or it's not the correct way of handling such a case.
The Explore page is now in its own view with the searchable modifier enabled. I am unsure of how we can use the search bar to populate a search request, but this is still a work in progress. Search suggestions for users and hashtags appear as normal. Additionally, before trends load in, a placeholder with five tags is inserted to prevent massive UI jittering. The trending tags localization has also been fixed by writing an explicit header with localizable text.
Some touch ups have been made to the standard navigation layout for the macOS and iPadOS clients to match the current iOS counterparts. Trending tags appear in the side bar along with the new Home, Network, and Messages tabs. Older sidebar actions have been removed to better follow the new design. Some pieces of text have been given new localizations in English. The settings view from the Settings tab on iOS has been ported to macOS as the Preferences window. The login window will appear if the user is not logged in, though the OAuth flow seems to disregard whether or not the OAuth status has changed, and it opens a new instance on macOS. The profile card now has three different configurable sizes for the profile image. Entitlements for macOS have been added with network configurations.
To facilitate converting the sanitized HTML to Markdown, new String extension methods exist. Currently, linking doesn't work as intended.
The TimelineView now displays an empty placeholder when no posts are found, or a placeholder when the resulting list is nil. The Home view has also been introduced with a custom header bar on iOS. This is typically only present on the Compact layout.
This includes the Home page, the Network page, and the trending tags list.
This also refactors ProfileImage to accept any given account type.
This seems to resolve the problem where navigation links are disabled on the Network view.
Both of these now use an underlying TimelineViewable, which is responsible for fetching the data and handling async state representation with views. TimelineViewable merely requires the developer to pass in a ViewBuilder which specifies what the loaded result will look like, instead of rewriting the code for representing all of the states. This was necessary to get ProfileView to display posts from a user's profile, since the scope in TimelineViewable has been adjusted for this. The ProfileView's TimelineScrollViewCompatible seems to be suffering from a ForEach, issue, however: ForEach<Range<Int>, Int, AnyView> count (157) != its initial count (1). `ForEach(_:content:)` should only be used for *constant* data. Instead conform data to `Identifiable` or use `ForEach(_:id:content:)` and provide an explicit `id`! Which shouldn't be an issue because we're using the status's ID, but it's not being registered. I suspect the nesting of this inside of the View may be causing some of the issues here, since it's not being affected on the Home and Network pages.
Some of the template text has been replaced with data that can be pulled from the Account data.
The blurb section of the ProfileView uses reusable methods and variables that will construct the blurbs themselves, trimming down the size of the code and making it more readable. It also appears that the action for the blurb button is broken; i.e., it doesn't do anything. This should be investigated.
For future usages of ISO strings, please use String.toMastodonDate to convert the String to a proper Date object that formatters can use.
.animation(_:) was deprecated in iOS 15 and recommended .animation(_:, value: V) instead. This has been changed to account for this deprecation.
Some more complicated views have been moved to corresponding properties of the struct, and some parts of the code have been documented accordingly.
The notifications page doesn't yet fetch or have representations for notifications, but the base parts of the page are present.
alicerunsonfedora
changed the title
🚧 Merge changes into root
🚧 Merge updated Starlight code into main branch
Oct 10, 2021
The directory listings show five people whose posts are active and new arrivals. They are NavigationLinks that correspond to their profile views. Additionally, a bug where the profile image in the ProfileView has been fixed by changing the profile context.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes Overview
This PR makes the following changes:
Does this PR fix, close, or implement any issues?
Pending for review
@hyperspacedev/swift-ui