TACTIC Open Source
tactic.ui.table.TaskElementWdg Bugs - Printable Version

+- TACTIC Open Source (http://forum.southpawtech.com)
+-- Forum: TACTIC Open Source (http://forum.southpawtech.com/forumdisplay.php?fid=3)
+--- Forum: TACTIC Discussion (http://forum.southpawtech.com/forumdisplay.php?fid=4)
+--- Thread: tactic.ui.table.TaskElementWdg Bugs (/showthread.php?tid=220)



tactic.ui.table.TaskElementWdg Bugs - listy - 06-25-2021

Hi All.
If anyone uses this widget in production, welcome to introduce here any bugs you getting.

First of all, this widget is outdated and must be not used by dev team as usual.

But, because we don't have any comparable alternative to that i decided to create a thread where i can post and describe bugs, and missing things related to this widget.

First thing: This widget uses old XML Piepeline descriptions, and ignores JSON pipeline from modern workflow editor. So every change we made in piepline editor with v4.8 is ignored by this widget.
However this is not blocking the work. But really anoying

Next. When we change statuses of different sobjects, and also add users to it - some status changes leaved unchanged. This is blocking and really anoying bug. (will record GIF to represent this)

Next. Slowness, ui inconsistense, too much server calls.
Slowness: when we have 4 processes it is fine and acceptable, but when we have 9+ processes table becomes too slow to even scroll or switch tabs.
UI inconsistense: drop down select items looks so old and have white bg with white text on it, names of users is too wide, there is no search for users (problem with even 20+ users), etc.
Too much server calls: Each item of each process on every users PC's constantly getting updates from server, and this cannot be disabled


RE: tactic.ui.table.TaskElementWdg Bugs - remkonoteboom - 06-25-2021

My personal opinion on this widget is that what it is trying to do is great, but over the years it has grown and now tries to do too much in a single widget. To such a degree that the code is quite a tangled mess and difficult to follow.

I would like to know what are the primary things people like about this widget and maybe it can be clean up / simplified or even rewritten.


RE: tactic.ui.table.TaskElementWdg Bugs - listy - 06-25-2021

(06-25-2021, 05:38 PM)remkonoteboom Wrote: To such a degree that the code is quite a tangled mess and difficult to follow.
Totally agree! This is so True.
A little fix can take hours of digging the code debris...

Notes widget is not less annoying in that way. Last time i wanted to make "process" select widget to match current process automatically, but i found that to make this will take tons of code additions.
Same with TaskElementWdg, to make it use new json pipeline and not break compatibility cold take days of rewriting and testing.

How we use this widget in daily basis? We just change statuses, assign users, that's all. Dodgy
When we got JSX and stuff, i think we can recreate such functionality and keep this lightweight and fast


RE: tactic.ui.table.TaskElementWdg Bugs - Nachogor - 06-28-2021

Same here about the use we give to TaskElementWdg Sometimes we have more than one View, one for example in Panel, filler, etc... and another in vertical no filler, keeping these display options is a good point for us.

Cheers,
Nacho


RE: tactic.ui.table.TaskElementWdg Bugs - remkonoteboom - 07-05-2021

You mentioned that the TaskElementWdg can be really slow.

In task_element_wdg.py, there is a preprocess function, is it possible you can time it for me?


Code:
import time
start = time.time()

.... <all the code in preprocess> ...

print("time: ", time.time() - start)



RE: tactic.ui.table.TaskElementWdg Bugs - listy - 07-05-2021

(07-05-2021, 03:32 PM)remkonoteboom Wrote: You mentioned that the TaskElementWdg can be really slow.

In task_element_wdg.py, there is a preprocess function, is it possible you can time it for me?


Code:
import time
start = time.time()

.... <all the code in preprocess> ...

print("time: ", time.time() - start)

time:  0.07304883003234863

For a 10 sobjects. 4 ghz cpu

Code:
request_id: 140253759268608 - #0000002
timestamp: 2021-07-05 18:52:39
user: admin
simple method: <function ApiXMLRPC.get_widget at 0x7f8f7747d1f0>
ticket: ac8a7066c7451e28de0
(   'tactic.ui.panel.TableLayoutWdg',
    {   'args': {   'element_names': 'preview,name,script,storyboard,general_checkin,checklist,duration,notes,task_pipeline_vertical,task_edit,approve_assets,assets_in_episode,shot,description,timestamp',
                    'expand_on_load': True,
                    'group_elements': [],
                    'search_keys': [   'complex/scenes?project=dolly3d&id=174',
                                       'complex/scenes?project=dolly3d&id=175',
                                       'complex/scenes?project=dolly3d&id=177',
                                       'complex/scenes?project=dolly3d&id=178',
                                       'complex/scenes?project=dolly3d&id=179',
                                       'complex/scenes?project=dolly3d&id=180',
                                       'complex/scenes?project=dolly3d&id=181',
                                       'complex/scenes?project=dolly3d&id=182',
                                       'complex/scenes?project=dolly3d&id=183',
                                       'complex/scenes?project=dolly3d&id=184',
                                       'complex/scenes?project=dolly3d&id=194',
                                       'complex/scenes?project=dolly3d&id=198',
                                       'complex/scenes?project=dolly3d&id=199'],
                    'search_type': 'complex/scenes',
                    'show_select': '',
                    'show_shelf': False,
                    'table_id': 'main_body_table_6876',
                    'temp': True,
                    'view': 'table'},
        'libraries': {   'spt_button': True,
                         'spt_calendar': True,
                         'spt_help': True,
                         'spt_html5upload': True,
                         'spt_mobile_table': True,
                         'spt_popup': True,
                         'spt_tab': True,
                         'spt_table': True,
                         'spt_view_panel': True},
        'values': {   'json': '[{"prefix":"filter_mode","filter_mode":"and"},{"prefix":"custom","custom_enabled":"on","filter_type":"_column","custom_column":""},{"prefix":"main_body","main_body_enabled":"","filter_type":"_column","main_body_column":"code","main_body_relation":"is","main_body_value":"SCENES00176"},{"prefix":"main_body","main_body_enabled":"","filter_type":"_column","main_body_column":"login","main_body_relation":"is '
                              'not","main_body_value":"Animator"},{"prefix":"main_body","main_body_enabled":"","filter_type":"_column","main_body_column":"login","main_body_relation":"is '
                              'not","main_body_value":"listy"},{"prefix":"search_ops","levels":[0,0],"ops":["and","and"],"modes":["child","child"]},{"prefix":"simple","handler":"tactic.ui.filter.KeywordFilterElementWdg","element_name":"keywords","value":""},{"prefix":"simple","handler":"tactic.ui.filter.TextFilterElementWdg","element_name":"name","op":"=","value":""},{"prefix":"keyword","value":"shorts"},{"prefix":"search_limit","Prev":"","Showing":"1 '
                              '- '
                              '14","Next":"","search_limit":"","limit_select":"100","custom_limit":"","Showing_last_search_offset":"0"},{"prefix":"group","group":"","interval":"","order":"","show_retired":""}]'}})

time:  0.07304883003234863
WARNING: site is empty
WARNING: site is empty
WARNING: site is empty
WARNING: site is empty
WARNING: site is empty
WARNING: site is empty
WARNING: site is empty
SQL Query Count:  218
BVR Count:  1116
Sending: 1691.6044921875 KB
Num SObjects: 522
Duration: 0.737 seconds (request_id: 140253759268608 - #0000002)

If i remove tasks column completely:

Code:
request_id: 140011924068096 - #0000006
timestamp: 2021-07-05 19:01:38
user: admin
simple method: <function ApiXMLRPC.get_widget at 0x7f572bca01f0>
ticket: ac8a7066c7451e28de0
(   'tactic.ui.panel.TableLayoutWdg',
    {   'args': {   'element_names': 'preview,name,script,storyboard,general_checkin,checklist,duration,notes,task_edit,approve_assets,assets_in_episode,shot,description,timestamp',
                    'expand_on_load': True,
                    'group_elements': [],
                    'search_keys': [   'complex/scenes?project=dolly3d&id=174',
                                       'complex/scenes?project=dolly3d&id=175',
                                       'complex/scenes?project=dolly3d&id=177',
                                       'complex/scenes?project=dolly3d&id=178',
                                       'complex/scenes?project=dolly3d&id=179',
                                       'complex/scenes?project=dolly3d&id=180',
                                       'complex/scenes?project=dolly3d&id=181',
                                       'complex/scenes?project=dolly3d&id=182',
                                       'complex/scenes?project=dolly3d&id=183',
                                       'complex/scenes?project=dolly3d&id=184',
                                       'complex/scenes?project=dolly3d&id=194',
                                       'complex/scenes?project=dolly3d&id=198',
                                       'complex/scenes?project=dolly3d&id=199'],
                    'search_type': 'complex/scenes',
                    'show_select': '',
                    'show_shelf': False,
                    'table_id': 'main_body_table_7032',
                    'temp': True,
                    'view': 'table'},
        'libraries': {   'spt_button': True,
                         'spt_calendar': True,
                         'spt_help': True,
                         'spt_html5upload': True,
                         'spt_mobile_table': True,
                         'spt_popup': True,
                         'spt_tab': True,
                         'spt_table': True,
                         'spt_view_panel': True},
        'values': {   'json': '[{"prefix":"filter_mode","filter_mode":"and"},{"prefix":"custom","custom_enabled":"on","filter_type":"_column","custom_column":""},{"prefix":"main_body","main_body_enabled":"","filter_type":"_column","main_body_column":"code","main_body_relation":"is","main_body_value":"SCENES00176"},{"prefix":"main_body","main_body_enabled":"","filter_type":"_column","main_body_column":"login","main_body_relation":"is '
                              'not","main_body_value":"Animator"},{"prefix":"main_body","main_body_enabled":"","filter_type":"_column","main_body_column":"login","main_body_relation":"is '
                              'not","main_body_value":"listy"},{"prefix":"search_ops","levels":[0,0],"ops":["and","and"],"modes":["child","child"]},{"prefix":"simple","handler":"tactic.ui.filter.KeywordFilterElementWdg","element_name":"keywords","value":""},{"prefix":"simple","handler":"tactic.ui.filter.TextFilterElementWdg","element_name":"name","op":"=","value":""},{"prefix":"keyword","value":"shorts"},{"prefix":"search_limit","Prev":"","Showing":"1 '
                              '- '
                              '14","Next":"","search_limit":"","limit_select":"100","custom_limit":"","Showing_last_search_offset":"0"},{"prefix":"group","group":"","interval":"","order":"","show_retired":""}]'}})

WARNING: site is empty
WARNING: site is empty
WARNING: site is empty
WARNING: site is empty
WARNING: site is empty
WARNING: site is empty
WARNING: site is empty
SQL Query Count:  63
BVR Count:  279
Sending: 440.6396484375 KB
Num SObjects: 101
Duration: 0.282 seconds (request_id: 140011924068096 - #0000006)
Memory: 100824 KB
Increment: 3512 KB

Note: Duration: 0.282 seconds, almost 3 times faster without task element widget

(07-05-2021, 03:32 PM)remkonoteboom Wrote: You mentioned that the TaskElementWdg can be really slow.
I think it's slow because its heavy layouts, js scripts and etc structures, which is really heavy and browser having hard time rendering it. But for user it's just 2 combos, and some labels...

In my opinion combo boxes with users should be replaced with interactive search box, which will load users as you type, or click to see whole list. At this time it's loading all users from particular groups, and this operation not cached, and making lots of db queries.
Same with the pipeline processes. There is no point having 10 preprocessed combos on each, while it can be replaced with interactive elements and do query only when necessary.

(My English is bad today, hope you understand)

And also:
Sending: 1691.6044921875 KB

vs

Sending: 440.6396484375 KB


RE: tactic.ui.table.TaskElementWdg Bugs - remkonoteboom - 07-06-2021

Thanks. Yes, the table widget it self doesn't draw all of the "edit" widgets until they are needed. However, this task widget does indeed draw everything. This could be certainly optimized.

I did however, fix the background colors of the select so that they are not white.


RE: tactic.ui.table.TaskElementWdg Bugs - listy - 07-09-2021

When i was "redoing" same widget for T-H, i was think about this widget as a "tiles". Every task status is like an item, with fast access buttons. We tested it in production, and it works really good.
See the screenshots for example. There is examples how it looks with different layouts.

Click on dots - opens menu. Click on notes - shows notes. When something changes, it changes its color and save button apper on indicidual tile - it's easier to click it, instead of rolling back to top of list. Save all, and refresh are here too.
Hope any part of this concept can be used in tactic.


RE: tactic.ui.table.TaskElementWdg Bugs - listy - 07-11-2021

In action:
[Image: attachment.php?aid=144]