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

Change about page to be mounted in the web UI #19345

Merged
merged 1 commit into from
Oct 13, 2022
Merged

Conversation

Gargron
Copy link
Member

@Gargron Gargron commented Oct 11, 2022

What used to be /about/more is now /about and is mounted in the web app. The information is presented in an easy to digest way. There are new APIs to provide the information that used to be in the HTML.

Screenshots

Dark Light
Screen Shot 2022-10-12 at 19 35 06 Screen Shot 2022-10-12 at 19 34 36
Screen Shot 2022-10-12 at 19 35 15 Screen Shot 2022-10-12 at 19 34 47

REST APIs

  • GET /api/v1/instance/extended_description returns content
  • GET /api/v1/instance/domain_blocks returns an array of domain, digest, severity and comment

Other notes

Moderated servers on the HTML page used to have a section dedicated to servers with rejected media. Due to the awkward way that setting overlaps with severities, I decided to go for a cleaner REST API and not return that information from the new API, limiting it only to silence and suspend severities.

@Gargron Gargron added api REST API, Streaming API, Web Push API ui Front-end, design labels Oct 11, 2022
@Gargron Gargron force-pushed the feature-about-web branch 6 times, most recently from 837f7ba to 90d5e40 Compare October 12, 2022 17:33
@Gargron Gargron marked this pull request as ready for review October 12, 2022 17:33
@ClearlyClaire ClearlyClaire self-requested a review October 12, 2022 17:45
Copy link
Contributor

@ClearlyClaire ClearlyClaire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why this is a single commit, as there are at least three changes here: adding REST API endpoints, redesigning /web/about, and getting rid of /about and /about/more.

Regarding getting rid of /about and /about/more, I'm uneasy with the fact that getting access to administrative information about the server now requires Javascript. Not only does this require a compatible browser with Javascript enabled, but getting the contact information for an instance with broken assets becomes harder.

Another loss from the /about redesign is the custom text regarding closed registrations: previously, when registrations were closed, admins were able to display a custom text on that form explaining why the registrations were closed, which is useful if registrations are only closed temporarily, or the instance requires specific steps (e.g. external registration form, financial participation, …). In such cases, the “Create account” button redirecting to https://joinmastodon.org/servers can be very confusing, even though I understand why that is here.

Yet another loss is the information around the instance actor, which used to feature a banner explaining what it was. That is now gone.

Thanks for finally adding /api/v1/instance/domain_blocks. I'm worried about the rather long cache duration for the new REST API endpoints, though.

There's a minor issue in width-constrained situations, especially on multi-column setups:
image

Another issue with this PR is that if no custom server description is set, the API will error out, and the About section will be empty. It might make more sense either skipping the section or having a line of text explaining the server administrators did not set a custom description.

With all that said, I think this new design is very good, and I really like it! It's about on par with the old /about in terms of friendliness and access to server info, login and registration, and it provides quicker access to server rules (although I think those still need to be translatable) and moderated servers. There is a bit of redundancy with the left side panel when logged out, but it's not too bad. As it stands, the only losses I see with it as a logged-out landing page are the missing closed registration text (maybe the “Create account” button could be changed to open a modal explaining registrations are currently disabled, with the optional admin-set text, and a link to joinmastodon.org), and the fact that it requires Javascript.

@Gargron
Copy link
Member Author

Gargron commented Oct 13, 2022

Note that /about wasn't removed in this PR but a previous one. I can see the sense in the closed registrations message and I suggested the modal approach on Discord. But I won't be including it in this PR. I fixed the layout in the multi-column layout, fixed the extended description API, changed caching periods to be 3 minutes long, and added empty placeholders for all sections ("This information has not been made available on this server."). I also hooked up the server thumbnail to the blurhash and different resolutions now available in the API.

@ClearlyClaire
Copy link
Contributor

Note that /about wasn't removed in this PR but a previous one.

Yes, unfortunately. I'm aware.

Copy link
Contributor

@ClearlyClaire ClearlyClaire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My issue with requiring JS (and properly built and served assets) remains, but there isn't much way around it besides server-side-rendering. Otherwise this looks good. Please address the closed registration message thing soon, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api REST API, Streaming API, Web Push API ui Front-end, design
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants