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

Support manifest.json to install as WebApp #1757

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kristofzerbe
Copy link

I would love to see brid.gy installable as a WebApp on Desktop and Mobile. Here's the manifest.json and all referenced images

@snarfed
Copy link
Owner

snarfed commented Jul 11, 2024

Hmm, interesting! Thank you for the contribution!

I'm not sure I see the motivation though. Bridgy isn't really an end user application that you interact with regularly, it's more of a service that you turn on and then let run in the background. I'm curious, do you look at or use the Bridgy web UI regularly? eg https://brid.gy/mastodon/@[email protected], or another user page, or something else? If so, what do you do?

@snarfed
Copy link
Owner

snarfed commented Jul 11, 2024

(I noticed that you also added manifest.json to @aaronpk's webmention.io, which I'd have the same question about.)

@kristofzerbe
Copy link
Author

Yes, I check both brid.gy and webmention.io regularly, because I keep experiencing dropouts. And having both sites installed as web apps makes everything easier for me.

@snarfed
Copy link
Owner

snarfed commented Jul 11, 2024

Aha, that makes sense. I get how PWA support would help.

Out of curiosity, could you describe the dropouts? I'm curious what's happening there.

@kristofzerbe
Copy link
Author

Sure, but it doesn't seem to follow a pattern and I don't know where it sometimes gets stuck. I syndicate a post on Mastodon and get some reactions, which I load into the post via JS.
Every now and then I notice days later that certain posts had reactions, but they are not displayed in the post. Then I see on webmention.io that they are missing and initiate a manual poll on brid.gy. A short time later they appear.

@snarfed
Copy link
Owner

snarfed commented Jul 12, 2024

Got it! Bridgy only automatically backfeeds to your 30 most recent posts, https://brid.gy/about#missing . Are the missing reactions maybe past that? If by "manual poll," you mean you enter the post URL into the "Resend for post" box, that could be it. But if you just mean that you're clicking the "Poll now" button, it's probably something else.

@kristofzerbe
Copy link
Author

kristofzerbe commented Jul 12, 2024

No, it's not the recent 30 problem. I don't publish so often. If it happens, then definitely at posts below that limit.
I usually use 'Poll Now' and see what happens. Sometimes I also use 'Crawl Now'. I guess it's kind of a timing problem because after the post is published I manually syndicate due to the character limit and then manually update the post again with the created link.

Whatever or however, as much as I love your service, my brain sometimes despairs at the complexity of the matter. Then I'm happy to be able to press a few buttons ;) ... But I vow to look more for fault patterns.

Copy link
Owner

@snarfed snarfed left a comment

Choose a reason for hiding this comment

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

Thanks for doing this! Sounds like a worthwhile addition. A few minor thought on the manifest, nothing showstopping.

@@ -0,0 +1,84 @@
{
"name": "brid.gy",
Copy link
Owner

Choose a reason for hiding this comment

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

Bridgy

Copy link
Author

Choose a reason for hiding this comment

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

manifest needs a name

Copy link
Owner

Choose a reason for hiding this comment

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

Sure, I meant to change it to "Bridgy", not remove it

Copy link
Author

Choose a reason for hiding this comment

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

:D

"background_color": "#ffffff",
"display": "standalone",
"orientation": "portrait-primary",
"related_applications": [],
Copy link
Owner

Choose a reason for hiding this comment

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

probably remove these two?

Copy link
Author

@kristofzerbe kristofzerbe Jul 13, 2024

Choose a reason for hiding this comment

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

Not necessary

Copy link
Owner

Choose a reason for hiding this comment

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

Not necessary, but I'd like to, since they're optional 😁 https://developer.mozilla.org/en-US/docs/Web/Manifest#members

Copy link
Author

Choose a reason for hiding this comment

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

Misunderstanding here from my side :D. I meant: They are not necessary, because optional

"related_applications": [],
"prefer_related_applications": false,
"icons": [
{ "src": "manifest-icons/icon-72x72.png", "sizes": "72x72", "type": "image/png" },
Copy link
Owner

Choose a reason for hiding this comment

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

These aren't all necessary, right? I'd rather avoid maintaining lots of new logo files. Should we maybe just use some of the existing static/bridgy_logo* files?

Copy link
Author

Choose a reason for hiding this comment

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

Many different devices types needs different icons. These are the minimum for Chrome, Safari, Edge and so on.

Copy link
Owner

Choose a reason for hiding this comment

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

Huh. Do those browsers not resize existing icons if there's not already a preferred size? Got a link with details?

Copy link
Author

Choose a reason for hiding this comment

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

It's best practice many of these generators also use and low level for the main OS's Android and iOS. For one of my PWAs, I took the effort to look at all the specs and came up with over 80 icons, including the maskable stuff :)

https://stackoverflow.com/questions/48839338/which-icon-sizes-are-required-for-progressive-web-apps-pwa-as-of-q1-2018

Copy link
Owner

Choose a reason for hiding this comment

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

Hmm. It sounds like the major browser and platforms generally scale down icons fine: GoogleChrome/lighthouse#291 (comment)

Copy link
Author

Choose a reason for hiding this comment

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

My experience is rather "should", but it is actually more of a marginal problem. Therefore, two or three slightly larger icons are also adequate

Copy link
Owner

Choose a reason for hiding this comment

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

Great! There are currently six JPGs with opaque white background and five PNGs with transparent background, across a range of sizes and aspect ratios. Maybe we start with these, either some or all of them, and see how it goes?

  • bridgy_logo.jpg
  • bridgy_logo_128.jpg
  • bridgy_logo_16.jpg
  • bridgy_logo_75.jpg
  • bridgy_logo_square.jpg
  • bridgy_logo_square_1024.jpg
  • bridgy_logo_with_alpha.png
  • bridgy_logo_with_alpha_128.png
  • bridgy_logo_with_alpha_16.png
  • bridgy_logo_with_alpha_75.png
  • bridgy_logo_with_alpha_square_1024.png

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

Successfully merging this pull request may close these issues.

2 participants