Ticket #2410 (closed bug: obsolete)

Opened 15 years ago

Last modified 13 years ago

template-dialog-tree-reorganization - The template dialog must be sorted in order to improve templates' usability.

Reported by: todor Owned by: boyanl
Priority: major Milestone: X3
Component: uncategorized Version: 2.0
Keywords: Cc:
Category: unknown Effort:
Importance: Ticket_group:
Estimated Number of Hours: 0 Add Hours to Ticket: 0
Billable?: yes Total Hours: 0
Analysis_owners: todor Design_owners: boyanl
Imp._owners: boyanl Test_owners:
Analysis_reviewers: boyanl Changelog: Changelog
Design_reviewers: meddle Imp._reviewers: todor, meddle
Test_reviewers: Analysis_score: 3.5
Design_score: 3.5 Imp._score: 3.5
Test_score: 0

Description (last modified by deyan) (diff)

  • The items in the template dialog must be organized according to some criteria in order to improve template's usability.
    • The tree structure can be rearranged this way:

Frame
|_Use as a default template
|_Content
| |_Main resource
| |_Controls visibility*
| |_Loop*
| |_Browser URL*
| |_Chaining mode*
|_Appearance
| |_Wrapping mode
| |_Background
| | |_Color
| | |_Type
| | |_Gradient
| | |_Image
| | |_Opacity
| | |_Pattern options
| |_Shadow
| |_Enabled
| |_Opacity
| |_Position
| |_Color
|_Properties
| |_Frame visibility
| |_Size
| |_Location
| |_Orientation
| |_Links
| |_Timeline options
| |_Insets
| |_Margin
| |_Padding
|_Other

  • Frame specific features
  • For now the Other entry is reserved for possible future keys
  • The selection behavior is the same as the one described in #2394
  • For other levels the structure is analogical

Page
|_Content
| |_Group A
| | |_Frame A
| | |_Frame B
| |_Appearance
| |_Properties
| |_Other
|_Appearance
|_Properties
|_Other

  • (optional) Some of the entry names are not enough explanatory, you can rename them as it's shown above.

Attachments

categories.patch (65.8 KB) - added by boyanl 15 years ago.

Change History

comment:1 Changed 15 years ago by todor

  • Status changed from new to s1b_analysis_finished
  • Description modified (diff)

comment:2 Changed 15 years ago by todor

  • Description modified (diff)

comment:3 Changed 15 years ago by todor

  • Description modified (diff)

comment:4 Changed 15 years ago by todor

  • Description modified (diff)

comment:5 Changed 15 years ago by todor

  • Description modified (diff)

comment:6 Changed 15 years ago by todor

  • Description modified (diff)

comment:7 Changed 15 years ago by todor

  • Description modified (diff)

comment:8 Changed 15 years ago by boyanl

  • Design_owners set to boyanl
  • Status changed from s1b_analysis_finished to s2a_design_started
  • Design_reviewers set to boyanl
  • Imp._owners set to boyanl
  • Analysis_score changed from 0 to 3.5

The description is clear and sufficient.

comment:9 Changed 15 years ago by boyanl

  • Analysis_reviewers set to boyanl

comment:10 Changed 15 years ago by boyanl

  • Design_reviewers boyanl deleted

comment:11 Changed 15 years ago by boyanl

  • Status changed from s2a_design_started to s2b_design_finished
  • Add an @interface Category for the annotation marking the category for each key, which is constructed from a String. It can be placed above a field, or a class (so all of its fields are considered annotated with this category).
  • Add an inner class Categories containing pre-defined names for the categories (to avoid duplication and misspelling).
  • Add a static method in ResourceR4 that gets the keys annotated with @Category in a given class (and its superclasses/interfaces).
  • Rename TemplateDialog to CreateTemplateDialog.
  • Modify the dialog logic in the CreateTemplateDialog class to add category nodes to the tree too.
  • Modify some logic in the CreateTemplateDialog.CheckBoxTree.CheckNode to avoid code duplication and to handle deletion of children nodes.
  • Extract the "Use as a default template" node as a checkbox outside of the tree.

Changed 15 years ago by boyanl

comment:12 Changed 15 years ago by meddle

  • Status changed from s2b_design_finished to s2c_design_ok
  • Design_score changed from 0 to 3.5
  • Design_reviewers set to meddle
  • Don't forget that the annotations must be 'Runtime' ones.
  • Don't put the method getting the keys in ResourceR4. This is more view related feature, use the ResourceH class for that.
    • Don't write such complex logic, ResourceR4 has methods for retrieving all the keys of a resource, use it, it is already written, then filter all the keys that are annotated.
    • If I was you, I would add a method getKeys(KeyFilter, Class<? extends ResourceR4>) in ResourceR4, that gets all the keys from a resource by a given filter (write such interface yourself and write filter that checks for the category annotation)...
    • Other thing is to write similar method that returns all the keys grouped by some categories (with special KeyCategoryFilter) in a map, and call this method with the right category filter form ResourceH... You decide, I give you some reusable ideas, but if you add such methods, I want ModelUnitTests!
  • Also... Make a branch, deleting stuff with patch is buggy (renaming = delete + create), I told you this last time...

3.5p

comment:13 Changed 15 years ago by boyanl

  • Owner set to boyanl
  • Status changed from s2c_design_ok to s3a_implementation_started

comment:14 Changed 15 years ago by boyanl

  • Status changed from s3a_implementation_started to s3b_implementation_finished

Made some further changes:

  • Removed getCategorizedKeys in ResourceR4 and instead added a method getKeys(KeyFilter keyFilter, Class<? extends ResourceR4> resourceClass. The KeyFilter interface has one method boolean acceptKey(Field field, Class<?> declaringClass, where field is the field corresponding to the key and declaringClass is the class this field was declared in.
  • Added a method getCategorizedKeys in the ResourceH class, which fetches all the keys annotated with the Category annotation, it uses the getKeys method described above.
  • Added a testing class (ResourceR4Test) for ResourceR4 (which currently just tests the functinality of getKeys)

The changes are in [9074].

comment:15 Changed 15 years ago by deyan

  • Description modified (diff)

comment:16 Changed 15 years ago by meddle

  • Status changed from s3b_implementation_finished to s3c_implementation_ok
  • Imp._score changed from 0 to 3.5
  • Imp._reviewers set to todor, meddle

Merged into the trunk at [9095].

  • A lot of malformed/fake JavaDoc in Category and KeyFilter.
  • Place the curly brackets on the same row as the class definition.
  • Don't write in the JavaDoc links as {@link: Something} it does not become link in the html. The right syntax is {@link Something} and for methods {@link: #Something}.
  • Write inlined in methods class declarations only if you are sure the class will be used only in the method... For your filter, I am not sure (for the future), so I converted it to nested.

comment:17 Changed 13 years ago by meddle

  • Status changed from s3c_implementation_ok to closed
  • Resolution set to obsolete

Closing all the tickets before M Y1

Note: See TracTickets for help on using tickets.