-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
App Picker for Desktop #4485
App Picker for Desktop #4485
Conversation
Adds new runtime function getJsonFromBase64
'https://apps.testrun.org/xdcget-lock.json' | ||
) | ||
const apps = await runtime.getJsonFromBase64(response.blob) | ||
if (apps) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use the same function like in browser.runtime and thus implement that in the frontend, but I'm not really sure if that function is reliable.
Another solution would be to return a JSON string instead of a base64 encoded blob from backend, if the content-type is 'application/json'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use the browser version in all cases. if it should have issues, which I don't think o (since you didn't use atob/btoa), then I'll help to find a solution that works just in the browser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since you didn't use atob/btoa
The solution uses atob but fixes the resulting "wrong" characters
I removed it now from runtime
nice! great you push that forward ❤️ i did not expect to have sth. native here, however, it seems no to be too complex when looking at the line count only :) i also did not follow background discussions here, tbh. maybe that was the easier approach at the end - otoh, eg. detail view with descriptions is missing, so there is still sth missing compared to using the website. also the order is different from the website, and the search field does not show the characters, but that's probably known however, for:
if somehow possible, it would be nice to support a "normal" website for that. otherwise the requirements for users to run alternative stores would be far higher - and would also be different for Android/iOS and Desktop. the idea of a "configurable store" was also to make that as easy as possible - currently, it would be enough if a user throws some .xdc on a server and let apache/nginx render the directory, without thinking about how to generate a json. otoh, there are no alternative stores atm :) - and on android, it is also to make f-droid happy :) or was the native approach mainly to avoid running an external website as being regarded too critical? some background about the decision would be good :) |
Yes that can be added easily. There is an UI question though: is it nicer to have a 1-click to add it or a 2-click like on the website. Also if we should show just an overlay or a separat view (since Desktop is also used on small screens maybe both needs to be provided?) Maybe an info Icon showing the overlay - but a click on the app adds it directly? |
if you can host a web server, then you can also write a json file and host it as well. Or use xdcget to generate one. Why "native"? Summary Pro:
Con:
|
Some icon examples that might fit (alt attribute contains name): |
- remove jsonFromBase64 from runtime - esc key to close AppPicker - show info overlay
Are you sure it was related to the tab? I see it on first load if the icons are not yet loaded? I also changed the word to "Loading" |
On Mon, Jan 13, 2025 at 07:33 -0800, bjoern wrote:
> make URL configurable
if somehow possible, it would be nice to support a "normal" website for that. otherwise the requirements for users to run alternative stores would be far higher - and would also be different for Android/iOS and Desktop.
If the main interface better is the "json" along with some files,
that might be acceptable? The "index.html" + JS would then be a fallback
if the consumer does not have a way to visualize these json-data itself.
|
Loads apps (as JSON) from https://apps.testrun.org and shows a picker
Closes #4463.
make URL configurable ?not for now, see discussion at #4463closes #4463