Patch #17924
closedStructured Document list for more flexible UI design with CSS
Description
Current version of Document list is built with h4, p, and div for title, updated date and description on same depth with parent h3 in HTML structure.
h2. Document h3. Technical documentation h4. My First Document p. updated time div. description h4. My Second Document p. updated time div. description
In this structure, page customizing is not easy and list scroll is heavy if there is so many documents. and someone like me want to see more structured view like:
h2. Document ` h3. Technical documentation | h4. My First Document | | p. updated time | ` div. description ` h4. My Second Document | p. updated time ` div. description
I Think, sometimes table view is more fit to document list and sometimes current Page-like view with indents is more fit for some project. so using div is more flexible for customizing the view per usage.
Attached patch includes view patch to add hirerachy for document elements and example css for alternate style is for table like inline view.
please consider this patch. I will make pull request on github too.
Files
Updated by Yonghwan SO over 10 years ago
Oops! I read wiki Contribute now. I will not make pull request on github. sorry.
Updated by Mizuki ISHIKAWA over 3 years ago
- File 0001-Structure-the-document-list.patch 0001-Structure-the-document-list.patch added
- File 0002-Structure-the-document-show-page.patch 0002-Structure-the-document-show-page.patch added
+1
I'm developing a Redmine theme. Document module pages are difficult to customize.
I will attach a patch with a slightly increased hierarchy in consideration of customizing with the theme. I also added a class for each element.
h2. Document div#document-list div.document-group h3.group-name Technical documentation div.document-item h4.title My First Document div.updated-on updated time div.description Description div.document-item h4.title My Second Document div.updated-on updated time div.description Description2 div.document-group div.document-item ...
I think the document list and how the document display page should be structured.
0002-Structure-the-document-show-page.patch changes the structure of the document display page as follows:
h2.title My First Document div#document-details div.attributes div.category-name div.created-on ul.document-custom-field-values li div.description div.attachemnts-area
Updated by Mizuki ISHIKAWA over 3 years ago
- File 0001-Structure-the-document-list.patch 0001-Structure-the-document-list.patch added
- File 0002-Structure-the-document-show-page.patch 0002-Structure-the-document-show-page.patch added
Fix the test code.
Updated by Mischa The Evil over 3 years ago
汪婷 汪: This seems a good improvement to me. Maybe you can add some screenshots to show the actual result?
Updated by Mizuki ISHIKAWA over 3 years ago
Mischa The Evil wrote:
汪婷 汪: This seems a good improvement to me. Maybe you can add some screenshots to show the actual result?
Thanks for your feedback.
This patch changes the HTML structure, not the design of the documentation pages.
I think that attaching a screenshot of the screen is not helpful for the review as it is the same view as before the change.
Updated by Mischa The Evil over 3 years ago
Mizuki ISHIKAWA wrote:
Mischa The Evil wrote:
汪婷 汪: This seems a good improvement to me. Maybe you can add some screenshots to show the actual result?
[...]
This patch changes the HTML structure, not the design of the documentation pages.
I think that attaching a screenshot of the screen is not helpful for the review as it is the same view as before the change.
My bad, you're right. I got distracted and finally mislead by the combination of the words increased hierarchy along with the indentation of the HTML structure examples given in the initial post and in your note. Nevermind me asking about this...
Updated by Go MAEDA over 3 years ago
- Category changed from UI to Documents
- Target version set to Candidate for next major release
Updated by Go MAEDA over 3 years ago
- Target version changed from Candidate for next major release to 5.0.0
Setting the target version to 5.0.0.
Updated by Go MAEDA almost 3 years ago
Thank you for posting the patch. I noticed the following points:
- The CSS class "document-group-*" that includes the document category name does not work for Unicode characters. For example, if a document category has a name "未分類" (means "uncategorized" in Japanese), the class name will be "document-group-". If all category names are consist of Unicode characters, they will have the same class name "document-group-". How about using
group.id
instead ofgroup.to_s.parameterize
? - I think it is better to rename "document-group-*" to "document-category" (see source:trunk/config/locales/en.yml#L1316)
Updated by Mizuki ISHIKAWA almost 3 years ago
- File 0001-Structure-the-document-list.patch 0001-Structure-the-document-list.patch added
- File grouping_options.png grouping_options.png added
Updated 0001-Structure-the-document-list.patch.
Go MAEDA wrote:
- The CSS class "document-group-*" that includes the document category name does not work for Unicode characters. For example, if a document category has a name "未分類" (means "uncategorized" in Japanese), the class name will be "document-group-". If all category names are consist of Unicode characters, they will have the same class name "document-group-". How about using
group.id
instead ofgroup.to_s.parameterize
?
Thank you for your feedback.
I tried to use group.id, but when the sort condition is title or date, it returns a String object.
In particular, it was difficult to convert the title group to Unicode, so I decided not to give a unique class name to the group.
Even without class names like document-group-{}, I think the clean structure will be enough to make CSS easier to write.
- I think it is better to rename "document-group-*" to "document-category" (see source:trunk/config/locales/en.yml#L1316)
The document category is one of the grouping options. You can also group by Author, Date, and Title. Therefore, I don't think it is appropriate to change .document-group to .document-category.
Updated by Go MAEDA almost 3 years ago
- Status changed from New to Closed
- Assignee set to Go MAEDA
Committed the patch. Thank you.