Skip to content

Dispatcher: action list fixes#13167

Merged
hius07 merged 11 commits into
koreader:masterfrom
hius07:actions
Feb 7, 2025
Merged

Dispatcher: action list fixes#13167
hius07 merged 11 commits into
koreader:masterfrom
hius07:actions

Conversation

@hius07

@hius07 hius07 commented Jan 30, 2025

Copy link
Copy Markdown
Member

(1) Remove unused kopt actions that are not shown in the bottom menu.

(2) Separate GoTo and Back actions for Reader and FileManager.

(3) Statistics:
-add "Time range" action
-group all actions together in the General section, except "Book statistics" in Reader section.
Closes #12690.


This change is Reviewable

@Frenzie

Frenzie commented Jan 30, 2025

Copy link
Copy Markdown
Member

Remove unused kopt actions that are not shown in the bottom menu.

Hold on, I'm not sure if that reasoning necessarily makes sense. Defect size for example can make quite a bit of impact, but presumably for interface simplicity it was left out of the quick tweaks for on-device reflow settings. But these are the advanced settings. I don't know if we decided on any particular relationship between the bottom menu and Dispatcher, but I've always thought Dispatcher is "more".

-de <size>        Defect size in points.  For scanned documents, marks
                  or defects smaller than this size are ignored when bounding
                  rectangular regions.  The period at the end of a sentence is
                  typically over 1 point in size.  The default is 1.0.

DKOPTREADER_CONFIG_DEFECT_SIZE = 1.0, -- range from 0.0 to 3.0

@hius07

hius07 commented Jan 30, 2025

Copy link
Copy Markdown
Member Author

name = "defect_size",
--- @translators The maximum size of a dust or ink speckle to be ignored instead of being considered a character.
name_text = _("Reflow Speckle Ignore Size"),
toggle = {_("small"), _("medium"), _("large")},
values = {1.0, 3.0, 5.0},
default_value = G_defaults:readSetting("DKOPTREADER_CONFIG_DEFECT_SIZE"),
event = "DefectSizeUpdate",
show = false, -- might work somehow, but larger values than 1.0 might easily eat content

name = "detect_indent",
name_text = _("Indentation"),
toggle = {_("off"), _("on")},
values = {0, 1},
default_value = G_defaults:readSetting("DKOPTREADER_CONFIG_DETECT_INDENT"),
show = false, -- does not work

@Frenzie

Frenzie commented Jan 30, 2025

Copy link
Copy Markdown
Member

So it is used? I'm afraid I'm not following. You said they weren't used.

Edit: okay, you were just showing that it says show = false there. I thought you were saying something new. ;-)

@hius07

hius07 commented Jan 30, 2025

Copy link
Copy Markdown
Member Author

I removed them because of the comments. Let's reconsider.

name = "defect_size",
name_text = _("Reflow Speckle Ignore Size"),
show = false, -- might work somehow, but larger values than 1.0 might easily eat content

Show in the bottom menu? Show in the action list?

name = "detect_indent",
name_text = _("Indentation"),
show = false, -- does not work

Show in the bottom menu? Show in the action list?

@Frenzie

Frenzie commented Jan 30, 2025

Copy link
Copy Markdown
Member

Speckle Ignore Size is definitely useful, but whether it's useful enough to clutter the bottom interface is another matter. But in Dispatcher/Profiles I don't think it's clutter. It's one of those settings you simply almost never have to change.

The comment may be referring to the provided values. See here for an example where 1.5 was helpful for example.


name = "detect_indent",
name_text = _("Indentation"),
show = false, -- does not work

I don't really know what that's supposed to do. Maybe it's related to koreader/libk2pdfopt#15

@yparitcher

Copy link
Copy Markdown
Member

Context
When i add the kopt setting to dispatcher i left commented any that were disabled in the bottom menu, as i wasn't sure if they were broken, but put them in to match so when an intrepid contributor fixed / tested them they would be available to use.

I would say that if you delete then from kopt (as broken), then delete then from dispatcher, otherwise they should probably stay

Comment thread frontend/dispatcher.lua
kopt_max_columns = {category="configurable", paging=true},
kopt_auto_straighten = {category="absolutenumber", paging=true},

settings = nil, -- reserved for per instance dispatcher settings

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is there for documentation purposes

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Restored.
I don't find this line to be helpful.

Comment thread frontend/dispatcher.lua
"kopt_zoom_overlap_h",
"kopt_zoom_overlap_v",
"kopt_zoom_mode_type",
-- "kopt_zoom_range_number", -- can't figure out how this name text func works

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If you figure can out the name_text func please leave this in, itdoes work in the bottom menu

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thank you, done.

@Frenzie

Frenzie commented Jan 31, 2025

Copy link
Copy Markdown
Member

I would say that if you delete then from kopt (as broken), then delete then from dispatcher, otherwise they should probably stay

+1 They're not broken nor should they be deleted.

@hius07

hius07 commented Jan 31, 2025

Copy link
Copy Markdown
Member Author

This one is deleted from Dispatcher:

name = "detect_indent",
name_text = _("Indentation"),
show = false, -- does not work

@Frenzie

Frenzie commented Jan 31, 2025

Copy link
Copy Markdown
Member

If so we should remove it everywhere really I think, but fair enough. :-)

@poire-z

poire-z commented Jan 31, 2025

Copy link
Copy Markdown
Contributor

I'd rather keep some traces that the kopt feature somehow is exposed and is just not working - than remove all traces of it - so people looking around can more easily know it exists and investigate/try/work on it.

@hius07

hius07 commented Jan 31, 2025

Copy link
Copy Markdown
Member Author

Okay, it's kept in koptoptions.

@hius07 hius07 merged commit 68cfd96 into koreader:master Feb 7, 2025
@hius07 hius07 deleted the actions branch February 7, 2025 17:27
@hius07 hius07 added this to the 2025.02 milestone Feb 7, 2025
0xstillb pushed a commit to 0xstillb/koreader-thai that referenced this pull request May 9, 2026
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.

Move "Reading progress" action to 3rd page and add "Time range" action for gestures

4 participants