Bug 1117541 - Update DocBuilder to use the patternfly css
Summary: Update DocBuilder to use the patternfly css
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: PressGang CCMS
Classification: Community
Component: DocBook-builder
Version: 1.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 1.9
Assignee: Chris Bredesen
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-08 22:47 UTC by Matthew Casperson
Modified: 2014-09-01 01:20 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-01 01:20:35 UTC
Embargoed:


Attachments (Terms of Use)

Description Matthew Casperson 2014-07-08 22:47:47 UTC
Update the appearance of DocBuilder to match the new look of the web UI.

Comment 1 Matthew Casperson 2014-07-18 02:37:44 UTC
https://github.com/pressgang-ccms/DocBuilder2/tree/restyle contains the initial work on this.

DocBuilder has been updated to dump the details of the specs (the data array) to a separate file called data.js. There is no longer any need to generate the HTML file each time.

old-index.html is the old ui slightly updated to read all data from data.js.
index.html is the new ui, which uses the same data.js file.

Comment 2 Matthew Casperson 2014-07-21 02:05:56 UTC
This is ready to be tested in the restyle branch.

Comment 3 Matthew Casperson 2014-07-21 02:09:12 UTC
The big changes are:
1. index.html files are no longer recreated with each build.
2. The spec data in data.js is now recreated with each build (in the root dir for untranslated content, and in the locale sub directory for translated content)
3. Translated specs are now shown with the root index.html, loading the data.js from the locale subdirectory.

Ignore the old-index.html and old-index-translated.html. They don't quite work, and will be deleted.

Comment 4 Lee Newson 2014-07-21 02:23:19 UTC
When there is no publican ZIP the link points to "/books/". This is confusing and not user friendly, as such the menu item should be removed or show some sort of error that there is no Publican ZIP.

Comment 5 Lee Newson 2014-07-21 02:40:51 UTC
(In reply to Lee Newson from comment #4)
> When there is no publican ZIP the link points to "/books/". This is
> confusing and not user friendly, as such the menu item should be removed or
> show some sort of error that there is no Publican ZIP.

This is also an issue in the current version, so we may want to split this into another bug.

Comment 6 Matthew Casperson 2014-07-21 02:56:02 UTC
PDF links are now disabled instead of pointing to the books directory.

Comment 8 Lee Newson 2014-07-21 05:21:52 UTC
- The list of titles should be evenly displayed in the columns. At the moment you can end up with one on the right and 10+ on the left.

- Having no "Publican ZIP" available shows "PDF Unavailable", this should say "Publican ZIP Unavailable" or something similar.

- The collapsed menu's aren't remembered correctly. As an example open a product list, close it and then change the filter. The list you just closed will now be open again.

- "To be synced" content should either not be shown or at least not show "To be synced To be synced".

- The old urls translation index pages don't work (or go to the old view). There should at least be a redirect index.html for these pages available, so that we don't mess with bookmarks. Additionally I think moving to the query based only page is a somewhat bad idea, as the old index pages made it easy to navigate backwards by just deleting part of the URL.

- The filter takes up a lot of screen space, we should be able to collapse it. Additionally the placement of the sort by should probably be moved into the blank space below "Title" to have less blank space.

- "Edit Spec", "Freeze Spec" and "Obsolete Spec" should not be displayed for translation index pages.

- When there are no specs, we should have a message to say that so users don't think something has gone wrong (this would mainly be used for translation pages).

------------------------------------------------------------------------------

- The new source code structure is inconsistent with the old source code. The new items are split up per project in the lib directory, while the old content is split up into the css/javascript/dictionaries directories. The new content should mirror this and not use a new structure, or the old content should be changed to match the new structure.

- A totally new config location has been added, we should NOT be doing this. As it stands now we have 3 or 4 separate config locations. This should be using the settings in deployment-details.js and then written to the httpd dir or included in data.js.

- The copy_js_files.sh has not been updated.

Comment 9 Lee Newson 2014-07-21 05:24:05 UTC
- Show Frozen and Show Obselete filter checkboxes shouldn't be shown on translation pages.

Comment 10 Lee Newson 2014-07-21 05:29:13 UTC
- The estimated rebuild time is gone. This maybe intentional, however even if it wasn't all that accurate it was still a useful feature.

Comment 11 Lee Newson 2014-07-21 05:32:40 UTC
(In reply to Lee Newson from comment #8)
> - The new source code structure is inconsistent with the old source code.
> The new items are split up per project in the lib directory, while the old
> content is split up into the css/javascript/dictionaries directories. The
> new content should mirror this and not use a new structure, or the old
> content should be changed to match the new structure.

Note: Doing the latter of these two options is going to cause backwards compatibility issues, so in my opinion the first option should be done.

Comment 12 Matthew Casperson 2014-07-22 05:29:56 UTC
> The list of titles should be evenly displayed in the columns. At the moment you can end up with one on the right and 10+ on the left.

The lists are now split evenly as long as the groups are collapsed.

> Having no "Publican ZIP" available shows "PDF Unavailable", this should say "Publican ZIP Unavailable" or something similar.

Yeah, I don't know what I was thinking there. That is now fixed, and other links, such as to the rendered document and the rendered document with remarks are also disabled if the build failed.

> The collapsed menu's aren't remembered correctly. As an example open a product list, close it and then change the filter. The list you just closed will now be open again.

This has been fixed.

> The filter takes up a lot of screen space, we should be able to collapse it. Additionally the placement of the sort by should probably be moved into the blank space below "Title" to have less blank space.

The filter can now be collapsed, and the collapsed state is remembered.

> "Edit Spec", "Freeze Spec" and "Obsolete Spec" should not be displayed for translation index pages.

These are no longer shown.

> When there are no specs, we should have a message to say that so users don't think something has gone wrong (this would mainly be used for translation pages).

There is a message displayed when no books can be found

> The new source code structure is inconsistent with the old source code. The new items are split up per project in the lib directory, while the old content is split up into the css/javascript/dictionaries directories. The new content should mirror this and not use a new structure, or the old content should be changed to match the new structure.

This has been consolidated (but not well tested). I have stuck with the lib/library_name format because I think it is a more useful directory structure than global javascript/css/images directories. It will mean a full rebuild of the books though (I assume this is what you meant by not being backwards compatible?)

> A totally new config location has been added, we should NOT be doing this. As it stands now we have 3 or 4 separate config locations. This should be using the settings in deployment-details.js and then written to the httpd dir or included in data.js.

The required information is written to data.js. This is not a great solution, as the translated build scripts duplicate the info, but they should be rewritten in JavaScript anyway to share the config file. See BX#1121862

> The copy_js_files.sh has not been updated

This has been updated. Haven't tested it well though.

> The estimated rebuild time is gone. This maybe intentional, however even if it wasn't all that accurate it was still a useful feature.

This is shown on the top bar.

Still need to fix these:

> Show Frozen and Show Obselete filter checkboxes shouldn't be shown on translation pages.

> The old urls translation index pages don't work (or go to the old view). There should at least be a redirect index.html for these pages available, so that we don't mess with bookmarks. Additionally I think moving to the query based only page is a somewhat bad idea, as the old index pages made it easy to navigate backwards by just deleting part of the URL.

> "To be synced" content should either not be shown or at least not show "To be synced To be synced".

Comment 13 Lee Newson 2014-07-22 05:38:59 UTC
(In reply to Matthew Casperson from comment #12)
> > The new source code structure is inconsistent with the old source code. The new items are split up per project in the lib directory, while the old content is split up into the css/javascript/dictionaries directories. The new content should mirror this and not use a new structure, or the old content should be changed to match the new structure.
> 
> This has been consolidated (but not well tested). I have stuck with the
> lib/library_name format because I think it is a more useful directory
> structure than global javascript/css/images directories. It will mean a full
> rebuild of the books though (I assume this is what you meant by not being
> backwards compatible?)

Yeah pretty much. I also was referring to the old-index.html pages and also if something went wrong with the caching then you might get something not working. For that last part though, that shouldn't happen with our current caching rules.

Comment 15 Lee Newson 2014-07-22 06:58:40 UTC
One other thing I noticed is that the title/product sorting appears to be case sensitive. I believe that it should be case insensitive.

Comment 17 Lee Newson 2014-07-22 07:11:19 UTC
Another minor UX issue I just noticed is that the "Last Built" tooltip displays when hovering over the menu. This is annoying as it blocks visibility to some of the options.

Comment 19 Matthew Casperson 2014-07-22 22:00:24 UTC
> Show Frozen and Show Obselete filter checkboxes shouldn't be shown on translation pages.

This is fixed.

> "To be synced" content should either not be shown or at least not show "To be synced To be synced".

This is fixed.

> Another minor UX issue I just noticed is that the "Last Built" tooltip displays when hovering over the menu. This is annoying as it blocks visibility to some of the options.

This is fixed.

The internal test site has been cleaned and reuploaded, so old files won't be hanging around.

I still need to test the changes to the app.js and docbuilder-translation scripts to ensure that the built books work properly.

Comment 20 Matthew Casperson 2014-07-23 02:32:04 UTC
> The old urls translation index pages don't work (or go to the old view). There should at least be a redirect index.html for these pages available, so that we don't mess with bookmarks. Additionally I think moving to the query based only page is a somewhat bad idea, as the old index pages made it easy to navigate backwards by just deleting part of the URL.

I've included a very simple redirection template in git, which can be used to redirect people to the new index page. We could also do this via HTTPD redirections, but it seems a little unnecessary. 

I think using the back button is still sufficient for people navigating backwards. There may be some value in manually modifying the URLs, but I have not seen it promoted as a standard UX practice.

If those using the new site find the URL layout problematic, I'm happy to reverse these decisions.

Comment 21 Lee Newson 2014-07-24 03:49:35 UTC
- The redirect html page requires configuration. This should be noted in the readme, or preferably it should pull the locale from the URL and redirect using that.

- On translation pages the ID url is not correct (it is missing the id)

- Clearing the filter seems to mess up the sort (or doesn't reset the sort box). To reproduce set the sort to ID and then click "Clear Filter" and note that the sort says ID, but the sort is actually title based.

- The "Last Built" tooltip on translation pages is always "Last Built:", so it doesn't actually show the last built time.

- The translation links always show as being available even if the book failed to build. (Note: If this needs the translation build to be ported for this to work, then ignore it for this bug and we can add it to BZ#1013410)

(In reply to Matthew Casperson from comment #12)
> > The list of titles should be evenly displayed in the columns. At the moment you can end up with one on the right and 10+ on the left.
> 
> The lists are now split evenly as long as the groups are collapsed.

Verified

> Yeah, I don't know what I was thinking there. That is now fixed, and other
> links, such as to the rendered document and the rendered document with
> remarks are also disabled if the build failed.

Hehe sounds like you'd been messing with the translation stuff at the time :) Anyways looks good, so verified!

> This has been fixed.

Verified that the collapsed menu's are remembered when switching the sorting.

> The filter can now be collapsed, and the collapsed state is remembered.

Verified. To be honest this is different than what I was thinking but it works as intended. Just for the record what I was thinking is that the filter would collapse off to the side similar to Jeff's TOC implementation on access.redhat.com.

> These are no longer shown.

Verified that "Edit Spec", "Freeze Spec" and "Obsolete Spec" menu items aren't displayed for translations.

> There is a message displayed when no books can be found

Verified that a message is displayed when no books match the filter and when no books are available.

> This has been consolidated (but not well tested). I have stuck with the
> lib/library_name format because I think it is a more useful directory
> structure than global javascript/css/images directories. It will mean a full
> rebuild of the books though (I assume this is what you meant by not being
> backwards compatible?)

Verified that all the libraries are stored in a consistent format. Additionally the old index pages have been removed, so that removes the backwards compatibility issue.

> The required information is written to data.js. This is not a great
> solution, as the translated build scripts duplicate the info, but they
> should be rewritten in JavaScript anyway to share the config file. See
> BZ#1121862

Verified that the config is now written to data.js from deployment_details.js.

> This has been updated. Haven't tested it well though.

Verified that this copied the base required files.

> This is shown on the top bar.

Verified that the estimated build time is shown and changes based on rebuild times.

> Show Frozen and Show Obselete filter checkboxes shouldn't be shown on translation pages.

Verified that these checkboxes aren't shown.

> "To be synced" content should either not be shown or at least not show "To be synced To be synced".

Verified that to be synced content is not shown.

Comment 23 Lee Newson 2014-07-25 03:03:02 UTC
Verified

Comment 25 Lee Newson 2014-07-30 06:25:41 UTC
(In reply to Matthew Casperson from comment #22)
> The docbuilder-translation script does not provide the information required
> to disable links and show last build times. I have made a note in BZ#1013410.
> 
> For now there is no tooltip added on the translated index pages.

This isn't true for the last build times. There is the lastcompile variable available which contains this data.

Comment 26 Matthew Casperson 2014-07-30 21:24:41 UTC
>Noticed this yesterday when doing other testing, but the Topic ID filter doesn't work, due to it using an incorrectly structured url.

>ie the query it does is:

>http://localhost:8080/1/topics/get/json/query;topicIds=33?expand=%7B%22branches%22%3A%5B%7B%22trunk%22%3A%7B%22name%22%3A%20%22topics%22%7D%2C%20%22branches%22%3A%5B%7B%22trunk%22%3A%7B%22name%22%3A%20%22contentSpecs_OTM%22%7D%7D%5D%7D%5D%7D

>when it should be:

>http://localhost:8080/pressgang-ccms/rest/1/topics/get/json/query;topicIds=33?expand=%7B%22branches%22%3A%5B%7B%22trunk%22%3A%7B%22name%22%3A%20%22topics%22%7D%2C%20%22branches%22%3A%5B%7B%22trunk%22%3A%7B%22name%22%3A%20%22contentSpecs_OTM%22%7D%7D%5D%7D%5D%7D

> This isn't true for the last build times. There is the lastcompile variable available which contains this data.

This has been fixed.

Comment 27 Lee Newson 2014-07-30 22:14:15 UTC
Verified


Note You need to log in before you can comment on or make changes to this bug.