Comments (28)
It would be nice if one could use custom items for (custom webapps)
It's already possible, there's a "custom" icon with a yellow star.
I really like your app
Thank you
from tangram.
Ah, you were talking about icon, sorry I misunderstood.
from tangram.
No problem. I could probably hardcode the svg into src/re.sonny.gigagram.services.gresource.xml.
from tangram.
Sure, I would like to have custom support though. If you'd like to have a try at it I'm happy to help.
The code to fetch/display icon is here https://github.com/sonnyp/gigagram/blob/master/src/tab.js#L46
You could start with editing by hand the settings of the app to add an icon path to the instances and use it if it is defined instead of the service icon.
from tangram.
I'll try to look into it as soon as I have time
from tangram.
Might want to wait a bit, I'd like to rework how adding a tab works.
The plan is
- Get rid of builtin services/icons
- When adding a tab, the user will be presented with a simple browser and url bar to enter any URL after what he can login/navigate the app and press "Done" for the tab to be added with the current URL.
- Use the icon from the website if available
- Allow user to set a custom icon via url/file
from tangram.
I just wanted to let you know that I managed to make it display custom icons. It still lacks a file selector and updating when editing the tab.
Your plan sees very good,especially for custom services, however I would probably keep some built-in services that can be quickly attached. A URL bar would also simplify testing a page, and pulling the icon from website would definitely simplify things.
Anyway, it was very educating as I have never written any desktop app in js before.
from tangram.
, however I would probably keep some built-in services that can be quickly attached
Yeah... I feel a bit uncomfortable with promoting specific services and having copyrighted material in the source code. However I agree that it would be a shame to remove quick access, an idea would be to re-introduce quick services via an optional remote web page.
Anyway, it was very educating as I have never written any desktop app in js before.
No worries it's not lost, we can already merge because I'm currently working on #19 anyway so it'll take a while before the new plan. And even after the plan is completed we'll need custom icons, the code would also come handy for #19 (to pick a icon for the deskop file) but let's focus on services for now.
Let me know if you're interested and I'm happy to help.
from tangram.
Okay I get that issue, and the quickstart webpage is a great idea.
I am actually interested in contributing, even though I fear that my code might still be a little messy :D
So far I have only written stuff like calculators and for my (now ex) schools website. The ulauncher plugin on my profile is the only real thing so far.
from tangram.
@codyfish no worries, we all start somewhere . Please open a pull request and I'll happily comment/review. Even if unfinished/messy/...
from tangram.
FYI I added a rudimentary/temporary icon choose for custom applications which you can use as inspiration e0b497f for service custom icon.
It is temporary because I want to replace it with a custom widget that allow selecting a GTK theme icon name.
from tangram.
Okay I'll open a pull request and try to work my changes into the new version. I managed to add a dialog, however the icon does still not update without a restart.
from tangram.
If you have any question you can ask them as comments on the PR. For "reactivity" you can use gsetting and bind. See how it is done for the tab name on https://github.com/sonnyp/gigagram/blob/master/src/tab.js#L45
instanceSettings.bind("name", label, "label", SettingsBindFlags.GET);
What it does is that everytime the name
setting changes, it set the label
property on label
from tangram.
I've seen this, but I think that I would need to call a function on change in order to load and scale the icon correctly. I'll take another look at the documentation.
Edit: I found the "changed" (http://webreflection.github.io/gjs-documentation/Gio-2.0/Gio.Settings-changed.html) event, this should work!
from tangram.
#29 - will probably make a bit more changes later
@codyfish thanks!
from tangram.
@codyfish I added you to the list of contributors, hope it's ok, tell me otherwise:
If you're interested, I think it would be great if the icon picker was an image button set with the current selection/value instead of a text field.
Like GNOME Settings > Details > user avatar but opens a FileChoserDialog with image preview if possible.
from tangram.
Yeah for sure, thank you!
I'll look into it.
from tangram.
@codyfish if you start working on it please let me know here or via a work-in-progress merge request. For "adding tab" (serviceDialog.js), the initial value of that "IconPicker" could be set with the favicon quite easily using https://gjs-docs.gnome.org/webkit240~4.0_api/webkit2.webview#method-get_favicon
from tangram.
Thanks. As I do not use gnome, do you mean something like this: https://www.youtube.com/watch?v=COzYz3fyJZs, only less advanced?
from tangram.
@codyfish exactly!
Let's start small though, I think it should only open the dialog when clicking on it for now.
Also I think the image should have a "button" style so it's clear it can be changed. Can easily be done with https://gjs-docs.gnome.org/gtk30~3.24.8/gtk.button#property-image
from tangram.
Okay thanks, I'll see what I can do
from tangram.
Sadly, Gtk.FileChooserButton does not seem to implement Button, therefore set_image()
is not available. https://gjs-docs.gnome.org/gtk30~3.24.8/gtk.filechooserbutton
I could either reinvent this button with an image or place the image next to the button somewhere. Do you have any other suggestions?
from tangram.
@codyfish that's what I meant in my previous message. Sorry I wasn't clear.
from tangram.
The way I saw this was to create a new widget with Gtk.Button
+ set_image
as you suggest and use https://gjs-docs.gnome.org/gtk30~3.24.8/gtk.filechooserdialog on click.
from tangram.
Okay I'll try that
from tangram.
I added support for fetching icon (and title) from web in #34 .
There are 3 different possible choices now:
- service "builtin" icon
- web app icon
- custom icon
It works like this:
If 2, default to 2 otherwise default to 1. When clicking on the icon chooser allow 3.
ToDo:
- Icon chooser does not show 1
- The icon (and title) fetching from the web app should start after the dialog has open and we should show a animated spinner in the icon chooser (like Epiphany)
- The button that triggers the dialog "Done" should be disabled when the page is loading
- The button "Done" in the dialog should be disabled until fetching icon/title is done
from tangram.
Seriously, great job! Icon fetching works perfectly and is really convenient!
from tangram.
Thanks!
"Icon chooser does not show 1" is fixed (for both services and applications) in #35
The rest of ToDo is considered minor issues at the moment and I'll do them later
from tangram.
Related Issues (20)
- application.runAsync is not a function HOT 1
- Missing sidebar HOT 7
- Non-flatpak Tangram 3.0 doesn't work on GNOME <44 HOT 3
- Pressing `Add` button doesn't immidatly add the page HOT 1
- quick toggles
- [Feature request] `pass` integration HOT 5
- Not working at all HOT 1
- Can i add new Translation HOT 1
- Cannot save files from Whatsapp Web
- Problems running over waypipe HOT 4
- Suggestion: Make it easier to switch between tabs HOT 1
- Snap package ready HOT 7
- Application not launching with X11 HOT 1
- some websites freeze and become unresponsive when minimized HOT 3
- When a video is in full-screen, the tab bar is still visible HOT 2
- Feature request: Pattern based URL handler for saved tabs
- Locale information does not load
- Home-page not displayed
- Feature request: Clear Website Data button in site preferences
- Design feedback: Destructive actions should warn user before completing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tangram.