-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Have metabot.modules.admin.default use metabot.util.adminui.fiel…
…ds instead of custom code to select a module. This changes the signature of all MODULE.admin functions to contain the parent's conf object (so modconf becomes botconf), the current frame's field's name in that conf (modconf = botconf[field]), and the current frame's description (currently unused). Followups will likely continue this to have admin.default use adminui.fields even earlier (for bot selection), as well as places like moderator.admin (for group selection), but doing so would currently require the functions to be split into multiple callables. Thought should be given as to whether to go ahead and break adminui.fields into a callable adminui.Menu (as sort of a partial function). This also requires field descriptions to be calculated every time the fields are processed, even if the descriptions are never used. Thought should be given as to whether to actually separate the field name and type list from the description list, or to maybe do something like: ('fieldname', adminui.fieldtype, lambda: 'field description'), i.e. make the desc a callable. There's a similar concern about a theoretical invalid_msg and empty_msg standardization for adminui.fields (or adminui.Menu): Right now admin.default actually opens a file on disk every time it displays the theoretical invalid_msg. If this becomes a string passed to adminui.fields/Menu, the file will be read every time the user navigates anywhere within /admin (not just at the top-level bot selection menu). See #63.
- Loading branch information
Showing
10 changed files
with
37 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters