SolidEdgeHousekeeper icon indicating copy to clipboard operation
SolidEdgeHousekeeper copied to clipboard

Consolidate Tasks UI

Open rmcanany opened this issue 2 years ago • 34 comments

Place task controls and settings into a hierarchical structure. Top level is a task category. For example, maybe Edit/update, Check, and Wrap up. Add images to the category and task lines for quick identification and a splash of color.

Add check boxes for file type, only where the task is applicable to that file type. If a task is selected, drop down its settings below the task name. The Windows form control TableLayoutPanel has this ability. Basic tutorial.

Provide an edit button to present a form for more complex settings. Return a Dictionary, which can be serialized to json for compatibility with the current Configuration scheme.

image

rmcanany avatar Dec 23 '23 16:12 rmcanany

Let's make it more personalizable, my idea is:

  • A grid where each line represents a task with checkboxes for environments and a button for the configuration.
  • Tasks in the grid are added from a list of available actions
  • Tasks in the grid can be removed
  • Tasks in the grid can be re-ordered according to the user's needing
  • A specific action can be added more time in the tasks list, for example, "Save as DXF" then "Save as DWG" etc.
  • A tasks list can be loaded\saved\deleted

farfilli avatar Dec 28 '23 07:12 farfilli

Those are all great ideas! I'll play around with it and keep you posted.

rmcanany avatar Dec 28 '23 15:12 rmcanany

Target for v2024.2

rmcanany avatar Jan 03 '24 21:01 rmcanany

TableLayoutPanel examples

https://www.c-sharpcorner.com/UploadFile/mahesh/tablelayoutpanel-in-C-Sharp/

rmcanany avatar Jan 13 '24 20:01 rmcanany

@farfilli I think I finally know a way to support multiple instances of a single command in a task list.

Currently, the tasks are held in a Dictionary(Of String, L2A). L2A is a LabelToAction object. It has that name for a reason that didn't actually work.

What I think I need is to have a Task object with some basic properties. Then I need to sub-classs that to make SaveAs, PropertyFindReplace, etc. Task objects. Each of the sub-class objects would hold all relevant information, such as SaveAs.FileType, SaveAs.DirectoryFormula, etc.

Right now I store that information in various places on the UI. That's not the way to do it.

Does that sound feasible? What am I overlooking?

rmcanany avatar Jan 21 '24 15:01 rmcanany

@farfilli I added some functionality to the header row. Now if you click the "+" button, it expands all task options. Click again to collapse.

Click the task-select header button and it clears the selections. I didn't think anyone would ever want to select all tasks, but could add it easily.

Click a file type button and it selects that file type for all selected tasks. Click again to clear.

Click the help button and it brings up the Readme page on GitHub. Click an individual task help button and it brings up the Readme of that command. Oh, any idea why the help icon is messed up? The others look good. I create them all the same way: Button.Image = Form1.ImageList1.Images("icons8_help_16.png")

Here's a picture. (This is from my Scratch code, not Housekeeper. It's going to break a few things. I wasn't ready to commit to that yet.)

task_tab

rmcanany avatar Jan 21 '24 16:01 rmcanany

My attempt to add some "Francesco Flair." What do you think?

task_tab

rmcanany avatar Jan 24 '24 16:01 rmcanany

It looks great! I would really have more time to help you. Place all that controls and manage them one by one is a nightmare. My idea is to create a configurable custom control for actions. Then you add it and configure for each action in the table. I will try to make a demo project for you.

farfilli avatar Jan 24 '24 18:01 farfilli

That would be great! I'm having trouble wrapping my head around that part!

rmcanany avatar Jan 24 '24 18:01 rmcanany

I created a new repo, Scratch, in case it would help you to see what I have so far. The main code is in TaskTabUtilitiesBuildUI.vb, FYI.

rmcanany avatar Jan 24 '24 21:01 rmcanany

Robert have a look at this repository I just created; it is a raw and dirty just to make you understand how it works. There is space for a lot of improvements according on how you want to proceed; we can discuss about it

https://github.com/farfilli/TaskListDemo

farfilli avatar Jan 25 '24 15:01 farfilli

Thank you very much! I'll study it today. If there is something I don't understand, I'll get back to you.

On Thu, Jan 25, 2024 at 9:39 AM Francesco @.***> wrote:

Robert have a look at this repository I just created; it is a row and dirty just to make you understand how it works. There is space for a lot of improvement according on how you want to proceed; we can discuss about it

https://github.com/farfilli/TaskListDemo

— Reply to this email directly, view it on GitHub https://github.com/rmcanany/SolidEdgeHousekeeper/issues/68#issuecomment-1910461046, or unsubscribe https://github.com/notifications/unsubscribe-auth/APKPB4DRM65YMQNKYHZTDVLYQJ4EDAVCNFSM6AAAAABBA4NN5SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJQGQ3DCMBUGY . You are receiving this because you were assigned.Message ID: @.***>

rmcanany avatar Jan 25 '24 15:01 rmcanany

I have added the combo box and configuration controls, polished the UI a bit

farfilli avatar Jan 26 '24 08:01 farfilli

I have added a property to control vertical border visibility image image

farfilli avatar Jan 26 '24 13:01 farfilli

Nice!

On Fri, Jan 26, 2024 at 7:40 AM Francesco @.***> wrote:

I have added a property to control vertical border visibility image.png (view on web) https://github.com/rmcanany/SolidEdgeHousekeeper/assets/19551661/5edc84b7-3aee-49d3-87c8-8f525d76fe83 image.png (view on web) https://github.com/rmcanany/SolidEdgeHousekeeper/assets/19551661/29f40e35-1410-40a2-bf79-4362a3698b71

— Reply to this email directly, view it on GitHub https://github.com/rmcanany/SolidEdgeHousekeeper/issues/68#issuecomment-1912086566, or unsubscribe https://github.com/notifications/unsubscribe-auth/APKPB4DFNZUZFODEP4ZOIDDYQOW6DAVCNFSM6AAAAABBA4NN5SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJSGA4DMNJWGY . You are receiving this because you were assigned.Message ID: @.***>

rmcanany avatar Jan 26 '24 14:01 rmcanany

Robert I have moved the Task types inside the TaskControl class, it is where it should be.

Let me know if you need modifications on the UI, I'm thinking that moving the combo beside the name would look better. Perhaps keep the combo line and add another one for the name line as optional.

farfilli avatar Jan 29 '24 14:01 farfilli

Makes sense. I'll check it out!

FYI, I'm refactoring the whole Task architecture. It's way cleaner. I now have a base class, Task. Each task will now inherit from that and have all the options and code contained within. You know, like it should have been from the beginning!

Nothing is on GitHub yet. I still have some integration work to do to.

rmcanany avatar Jan 29 '24 15:01 rmcanany

It would be great if each task contains the properties on how the TaskControl should be rendered, in this way all the information will be in the correct place and the TaskControl will contain just the code itself. Or even better, each task could contain the TaskControl

farfilli avatar Jan 29 '24 15:01 farfilli

That's my current thinking -- each task subclass contains its own TaskControl. I haven't gotten that far yet, but it sounds like we're on the same page.

rmcanany avatar Jan 29 '24 16:01 rmcanany

I would suggest to have an unique configurable TaskControl class that is used in each taskClass

farfilli avatar Jan 29 '24 18:01 farfilli

Yeah, I had the same idea. I think I can do the common stuff in the base class, then handle the task-specific options in the subclass.

rmcanany avatar Jan 29 '24 23:01 rmcanany

Got it working. Take a look if you get a chance! I don't have the list customization part done yet. Now that the Tasks are organized like they should be, it doesn't look too difficult.

We're releasing a big project at work this month -- perfect real-world test!

rmcanany avatar Mar 11 '24 21:03 rmcanany

I had a look; I wouldn't say I like the idea of creating the tasks UI all by code; it is difficult to customize as you want. Anyway, it looks promising. I did try to modify the tasks page "expand all" behavior as each task is repainted in sequence and makes an odd display during it. I wanted to add a suspend table layout panel before paint and reactivate it after but I didn't find where the event fires.

farfilli avatar Mar 12 '24 07:03 farfilli

Yeah, the "expand all" is funky. I tried Form1.SuspendLayout, but it didn't help. I didn't think to do that on the TLP. I'll give that a try. I hid all the event handlers in a separate class called Task_EventHandler, by the way. Seemed like a good idea at the time.

What I like best about it is how all options for a given task are right under your fingertips. That, and the consolidation from four tabs to one. There's a lot less jumping around the program to get things set up.

rmcanany avatar Mar 12 '24 13:03 rmcanany

Just to refine the UI, I would add a transparent background on checkboxes rather than a solid grey control color. The best would be to have a highlighted icon on the mouse hover

farfilli avatar Mar 12 '24 14:03 farfilli

Thanks for the suggestion. Keep 'em coming!

rmcanany avatar Mar 12 '24 14:03 rmcanany

I had a second look at the code; and did some tests to speed up the expand\collapse. I think the core of the slow performance is due to the amount of controls in the TLP. I would strongly recommend creating a custom control that handles each task. This will reduce dramatically the number of controls in the TLP, the custom control will be treated as a single control even if contains many. Side effect, you will have a visual designer to adjust the layout of the task UI

farfilli avatar Mar 13 '24 08:03 farfilli

I created a Pull request with changes that makes the expand\collapse an acceptable experience; have a look at it

farfilli avatar Mar 13 '24 08:03 farfilli

Nice! And, yeah I was never going to figure that out!

I'll have to read up on custom controls. If you have any samples, links, or tips, I would appreciate the info.

rmcanany avatar Mar 13 '24 14:03 rmcanany

I made the https://github.com/farfilli/TaskListDemo to show you how the custom control works; have a look and if you need help I will integrate it in the main project for you to use

farfilli avatar Mar 13 '24 14:03 farfilli