-
Notifications
You must be signed in to change notification settings - Fork 0
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
Move adminui.Frame (and the ability to use adminui.Menu) to the MultiBot dispatcher #66
Comments
One minor issue is the separation of the actual versus presentational label for each frame. Right now, when you enter I'm already changing While I'm here, I think it might be worth moving the field-sorting logic into |
Also, just to document my current thinking, I'm going to create an Also, just to write down a few other thoughts:
There could be an explicit The end result could be that every menu entry has a Optional Optional Optional Optional Maybe optional |
…(field=None) to catch anything not explicitly specified. Maintain Menu.fields in sorted order, if only to guarantee field=None is the last entry checked. This could have been implemented as explicitly forcing field=None to the end while preserving the rest of the natural order, but I don't think it's really worth allowing non-alphabetical fields in the UI. See #66.
(This is somewhat blocking #83 because I'm using a Menu to choose between entering an event-id-specific or event-title-specific config area. Right now I'm just constructing a dummy Frame, calling Menu.select, then creating new Frames (discarding the one returned by Menu.select) based on the handler.) |
Breaking this out from #63-507371095, the first step might be to add a new
parent
field toadminui.Menu.fields[]
. If set toNone
,Menu.dispatch
will continue to useframe.value
as the subframe'sparent
; otherwise, it'll usefield.parent
(as it were). This will allow menus to jump contexts easily—so if the default context for a top-level dispatcher isctx.userinfo
, so for exampleevents.settings
can naturally continue with the natural path,moderator.moddispatch
can still switch intoctx.groupinfo
when jumping tomoderator.admin
.This might also require
Menu.select(..., create=NEWHANDLER)
to actually be replaced with something likeMenu.add(field=None, handler=NEWHANDLER, parent=NEWPARENT)
(just to allow bothhandler
andparent
to be specified).The text was updated successfully, but these errors were encountered: