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

Even more Gesture Manager action suggestions #4687

Closed
3 tasks done
pickx opened this issue Mar 1, 2019 · 12 comments
Closed
3 tasks done

Even more Gesture Manager action suggestions #4687

pickx opened this issue Mar 1, 2019 · 12 comments
Labels
Milestone

Comments

@pickx
Copy link

pickx commented Mar 1, 2019

Now that the Gesture Manager has been massively revamped, here are some more features I personally use often:

  • Wikipedia lookup
  • Dictionary lookup
  • Toggle Reflow

There are more, but the action list is already pretty long at this point. Probably shouldn't bloat it with niche features.

@Frenzie Frenzie added the UX label Mar 1, 2019
@Frenzie Frenzie added this to the 2019.03 milestone Mar 1, 2019
@Frenzie
Copy link
Member

Frenzie commented Mar 1, 2019

Ah, reflow! I forgot about that one since fit to content width usually does the trick for me.

Fulltext search is another one that goes along with Wikipedia/Dictionary.

@gerhaher
Copy link

gerhaher commented Mar 1, 2019

  • Fulltext search
  • Go to page
  • Go to previous/next chapter

@Frenzie
Copy link
Member

Frenzie commented Mar 1, 2019

Dictionary, Wikipedia, and fulltext search would require some refactoring so they use events for showing the window. Not difficult, but not quite a quickie.

Edit: same with go to previous/next chapter but @poire-z already said he'd look into that.

@Frenzie
Copy link
Member

Frenzie commented Mar 1, 2019

  • Follow nearest link

Frenzie added a commit to Frenzie/koreader that referenced this issue Mar 2, 2019
Start your gesture on the link to follow it.

Defaults to southeast, northeast.

References koreader#4687
See koreader#4687 (comment)
Frenzie added a commit to Frenzie/koreader that referenced this issue Mar 2, 2019
Frenzie added a commit that referenced this issue Mar 2, 2019
Start your gesture on the link to follow it.

Defaults to southeast, northeast.

References #4687
See #4687 (comment)
@poire-z
Copy link
Contributor

poire-z commented Mar 2, 2019

Might need another to be complete (currently doable by long-press on Go back to previous location):

  • Clear location stack

@Frenzie
Copy link
Member

Frenzie commented Mar 2, 2019

Would you mind doing it? :-) (I won't tonight, in any case.)

@poire-z
Copy link
Contributor

poire-z commented Mar 2, 2019

ok, on it.

@poire-z
Copy link
Contributor

poire-z commented Mar 3, 2019

I don't see why anybody would need this one (but I actually missed it today:):

  • Exit (and why not Restart)

(@Frenzie : I feel like Exit might be tricky, I remember you spent some time on making it work correctly - so, is it? if you feel like adding it :)

Also, we have 3 forward-back-forward. The 4th one is missing: east west east - might be worth adding as the available ones by default as it's some easy to do gesture.

@Frenzie
Copy link
Member

Frenzie commented Mar 3, 2019

@poire-z It shouldn't be difficult since now you can just call the self.ui.menu:exitorRestart() method. The problem was in getting it right. ;-) Just sending a Close event around like we used to could lead to unpredictable results.

function FileManagerMenu:exitOrRestart(callback)
if SetDefaults.settings_changed then
UIManager:show(ConfirmBox:new{
text = _("You have unsaved default settings. Save them now?\nTap \"Cancel\" to return to KOReader."),
ok_text = _("Save"),
ok_callback = function()
SetDefaults.settings_changed = false
SetDefaults:saveSettings()
self:exitOrRestart(callback)
end,
cancel_text = _("Don't save"),
cancel_callback = function()
SetDefaults.settings_changed = false
self:exitOrRestart(callback)
end,
other_buttons = {{
text = _("Cancel"),
}}
})
else
UIManager:close(self.menu_container)
self.ui:onClose()
if callback then
callback()
end
end
end

function ReaderMenu:exitOrRestart(callback)
if self.menu_container then self:onTapCloseMenu() end
UIManager:nextTick(function()
self.ui:onClose()
if callback ~= nil then
-- show an empty widget so that the callback always happens
local Widget = require("ui/widget/widget")
local widget = Widget:new{
width = Screen:getWidth(),
height = Screen:getHeight(),
}
UIManager:show(widget)
local waiting = function(waiting)
-- if we don't do this you can get a situation where either the
-- program won't exit due to remaining widgets until they're
-- dismissed or if the callback forces all widgets to close,
-- that the save document ConfirmBox is also closed
if self.ui and self.ui.document and self.ui.document:isEdited() then
logger.dbg("waiting for save settings")
UIManager:scheduleIn(1, function() waiting(waiting) end)
else
callback()
UIManager:close(widget)
end
end
UIManager:scheduleIn(1, function() waiting(waiting) end)
end
end)
local FileManager = require("apps/filemanager/filemanager")
if FileManager.instance then
FileManager.instance:onClose()
end
end

Also, we have 3 forward-back-forward. The 4th one is missing: east west east - might be worth adding as the available ones by default as it's some easy to do gesture.

Sure. In the same obvious missing easy gestures you've got all the other diagonal ones.

Also, do you have an idea for an action on northeast, southeast, northeast? I don't have a clear vision for it like with the other gestures, but I like how it looks. :-P

@poire-z
Copy link
Contributor

poire-z commented Mar 3, 2019

northeast, southeast, northeast?

Not really. Triple full refresh , to really really really remove ghosting? :)

Would we need separators in the list of gestures? (doubles same axe, double orthogonal, triples, diagonal doubles...)

@Frenzie
Copy link
Member

Frenzie commented Mar 3, 2019

If you see a simple way to add it, sure. :-)

@NiLuJe
Copy link
Member

NiLuJe commented Mar 3, 2019

refreshFull() -> clear() -> refreshFull() -> forceRepaint() -> refreshFull()

(Or something to that effect :D).

Who said overkill? :D

mwoz123 pushed a commit to mwoz123/koreader that referenced this issue Mar 29, 2020
mwoz123 pushed a commit to mwoz123/koreader that referenced this issue Mar 29, 2020
mwoz123 pushed a commit to mwoz123/koreader that referenced this issue Mar 29, 2020
mwoz123 pushed a commit to mwoz123/koreader that referenced this issue Mar 29, 2020
Start your gesture on the link to follow it.

Defaults to southeast, northeast.

References koreader#4687
See koreader#4687 (comment)
mwoz123 pushed a commit to mwoz123/koreader that referenced this issue Mar 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants