feat: ControlsSettingsTable module#7264
Conversation
hjpalpha
left a comment
There was a problem hiding this comment.
- is not designed
- uses old table styles
- missing annos in some places
- commented out code in several places
- entire custom seems useless
- expands templates
- calls parsers
- mixes single and double quotes
- uses stringified html instead of widgets
- uses lots of parsing that should use the libs (e.g. DateExt) we have instead
|
|
||
| ---@param args {[string]: string?} | ||
| ---@return ColumnConfig[] | ||
| local function makeColumnConfig(args) |
There was a problem hiding this comment.
doesn't depend on args
this is just a copy ...
seems like a useless function
| ---@alias ColumnConfig | ||
| ---| {key: string, title: string} | ||
| ---| {keys: ({key: string} | string)[], title: string} | ||
| ---@alias ColumnValue {title: string, value: fun(data: {[string]: string?}): string?} |
There was a problem hiding this comment.
these aliases are bad (way too generic)
ElectricalBoy
left a comment
There was a problem hiding this comment.
should this really be placed in Commons?
fwiw i am not opposed to having a well-designed clean base version on commons but i don't think this is it |
|
@hjpalpha I went through your list and completely changed the code |
There was a problem hiding this comment.
heavily oppose this structure
it completely violates the widget setup
still
- is not designed
- uses old table styles / doesn't use table2
- expands template
- uses stringified html instead of widgets / builds images as wiki code instead of using widgets
uses lots of parsing that should use the libs we have instead
| arrow_left = 'Gamepad_button_arrow_left.svg', | ||
| arrow_right = 'Gamepad_button_arrow_right.svg' | ||
| }, | ||
| } No newline at end of file |
hjpalpha
left a comment
There was a problem hiding this comment.
additionally
lots of functions that should be private are not
lots of indent issues
should split display into a widget and processing/storage into a differe3nt one
not a fan of the current structure
| @@ -0,0 +1,59 @@ | |||
| --- | |||
| -- @Liquipedia | |||
| -- page=Module:Links/ButtonTranslation | |||
There was a problem hiding this comment.
i don't get why this is under Links
those are svg icons not links
| ---@return Widget | ||
| function ControlsSettingsTable.create(frame) | ||
| local args = Arguments.getArgs(frame) | ||
| local config = Info.controlsSettingsTable |
Summary
Module for saving and displaying player's input settings, based on current trackmania and rocket league versions, with a focus on making the table columns as flexible as possible for any wiki.
How did you test this change?
Custom module example for trackmania:
https://liquipedia.net/trackmania/Module:ControlsSettingsTable/Custom/dev/soba2
https://liquipedia.net/trackmania/User:SobakaPirat/ControlsSetingsTable