Closed lipido closed 7 years ago
In lines where bash
and href
are specified... Which action should I take? In addition, when you have dropdown items, the click is needed to expand the full contents.
This should only apply to the line before the line echo "---"
.
And take the first matched bash/href.
But the line before echo ---
is the line that appears in the panel and, right now, if you do click on it, a dropdown appears with the lines after echo ---
If so, dropdown should be disabled when the sh file has bash/href
on the echo line before echo "---"
Mmmm... I have a plugin which has several "rotating" messages before echo "---"
with href
and also several messages after echo "---"
with href
. I want to see in the dropdown. I think it is important not to loss functional possibilities by simply trying to tune appearance.
Easy. Add a new onClick
flag:
Run/Go
buttononClick
is bash
or href
For example:
echo "abcd | bash='blabla' onClick=bash"
Ok, and in the following case...
echo "abcd | bash=blabla href=link onclick=bash"
... the Go Button (only) should appear. If onclick is href
, the Run Button will appear instead.
I think this could be implemented. However, I think that the dropdown should be accessible in some way if there are lines after echo "---"
, of course. In such a case, making them inaccessible is a strange behavior. A solution would be, for example, to add a new button (like Go and Run) to show the dropdown (of course, if there are no lines after '---', this button will not appear).
No, I mean, if there is onclick
, both Run
and go
is not displayed at all, and the behavior will be as my above comment. Otherwise, it will appear as before.
This is the configuration of the user. If he does want to display the Run/Go
button, and the dropdown menu, he wouldn't use that onclick
What if the user wants to run a command by doing click and also to go to a link with href
? Easy, set the href
and the Go Button will appear.
With my proposal, you can do anything:
echo "Run with click (no buttons appear) | bash=command onclick=bash"
echo "Go to web with click (no buttons appear) | href=command onclick=href"
echo "Run with click (link with Go button) | bash=command href=link onclick=bash"
echo "Go to web with click (run with Run button) | bash=command href=link onclick=href"
Yeah, It looks ok now. Let implement. Waiting for the next update. 👍
Do you mean only one line in the file?
echo "Run with click (no buttons appear) | bash=command onclick=bash"
This line will appear in the panel and if clicked the command is run and the dropdown do not appear since it is empty (no lines after ---).
Can we activate the dropdown menu through the right mouse clicking?
I personally prefer a 'down-arrow' button to dropdown.
So, what about display the "down-arrow" if there is at least one echo
after echo ---
?
yes, that's what I said.
And an echo
before echo ---
without onclick
should do nothing on clicking on the title (not the run or go button) Because since now we access the dropdown menu through the arrow icon. Is it ok?
Edit: this case has no issue. Never mind.
Mmmm, paste here the entire program to confirm...
For example:
echo "google | href=link onclick=href"
echo `date`
echo "---"
echo "dropdown item"
When we click on the date, dropdown need not be display. We would show the dropdown through the arrow icon. Edit: no issue with this case. Never mind. ...waiting for your update.
Mmmm, this would be complicated. I would like to treat each line independently, so, since echo date
does not have any attributes, the default behavior is to show the dropdown when clicking it. What about of include none
value in onclick
?:
echo "google | href=link onclick=href"
echo "`date` | onclick=none"
echo "---"
echo "dropdown item"
Yeah, click on the date to show the dropdown menu has no problem. But if there is a onclick=none
would make the widget be more and more flexible.
Yes, for confirm
echo "google | href=link onclick=href" # arrow button appears since onclick is for href
echo "`date` | onclick=none" # arrow button still showing since onclick is disabled
echo "---"
echo "dropdown item"
But here
echo "google | href=link onclick=href" # arrow button appears since onclick is for href
echo "`date`" # arrow button **disappears** since we can access it via click
echo "---"
echo "dropdown item"
I don't think there is a problem if click to the date opening the dropdown, so, onclick=none is not necessary. The down-arrow button, I think its visibility should to be able to config through a preferred checkbox variable, similar to the preferred width/height of the widget.
Yes, It is another way. If we always show the arrow button it is more easy to implement. The onclick
is still valid as we defined (except that none
value is not needed).
So for Summary, I think these things need to be implemented: 1, add onclick attribute 2, add a preferred variable for the visibility of the arrow button.
Ok, the dropdown button is now committed (it only appears when the user hovers). The dropdown arrow button is the "new standard". I think it is much better (by now there is no option to change to the 'old-times'). The onclick
is also committed.
Please, try the latest version in the repo.
There are some issues:
1,
echo "en bash=cmd onclick=bash"
echo "---"
echo "Dropdown item..."
the arrow would appear when mouse hovers over the "en" text, and the text "en" would float to the left, the mouse would be at the position of the arrow. So user has to move the mouse to the left a bit to click to "en" icon. => A little annoyed. 2,
echo "en bash=cmd"
echo "---"
echo "Dropdown item..."
when the mouse hovers the "en" icon, it changes to the Run button which is too long, end the text "en" disappear, like this: [other widget] [too long Run button] [other widget]
I suggest these: 1, Add a variable to set the dropdown arrow always appear or not. 2, Let the "en" icon always appear, and make the Run/Go button shorter, maybe a small icon rather than the long button. Like this: [other widget] en [run icon] [dropdown arrow][other widget] (for the icon, I suggest monochrome icon style, for example: Play icon and Link icon...)
I have committed a new version with these two suggestions (it was not so easy as it seemed at first sight).
Try again. I see this with your script:
onclick=none
echo "A long long long long long long long long long long long string | bash=cmd"
echo "en | bash=cmd href=http://1.2.3"
echo "---"
echo "dropdown item"
Done points 1 and 3. Please test. Regarding point 2, I will open a different issue, since it is pure aspect related.
@lipido You forgot to git push
:( The latest commit is: https://github.com/lipido/kargos/commit/3ccc87dfbd4672b646988e76fe46747d909d8dc1
sorry!
Confirm that points 1 and 3, they work as expected. 👍
@trmdi suggested: "Could you give an option to display Run/Go button or display just a hover effect like the Share button, or even no effect at all." #2