Bug #3339
closed
[Workbench] Project descriptions on the dashboard should be truncated at the first paragraph break.
Added by Peter Amstutz over 10 years ago.
Updated over 10 years ago.
Assigned To:
Radhika Chippada
Estimated time:
(Total: 0.00 h)
- Category set to Workbench
- Subject changed from [Workbench] Project descriptions on the dashboard should only show the first sentence or first N characters of the project description. to [Workbench] Project descriptions on the dashboard should be truncated at the first empty line.
- Target version set to 2014-08-27 Sprint
- Assigned To set to Radhika Chippada
- Subject changed from [Workbench] Project descriptions on the dashboard should be truncated at the first empty line. to [Workbench] Project descriptions on the dashboard should be truncated at the first paragraph break.
- Status changed from New to In Progress
Comments on 0fe8a55
- From an code maintainability perspective, I don't understand why it's helpful to separate
render_textile_attribute
from render_textile_if_textile
(the names make it difficult to remember the difference, since they have such similar signatures). My personal feeling is that it'd be simpler to make render_textile_if_textile
a public method, add truncate=false
to its arguments, and have one method cover both cases. Is there some reason this isn't appropriate?
- The new tests check for misrendering twice. Please remove one of these assertions—probably the first one, since the second one checks the whole page.
Thanks.
Brett:
1. I did some refactoring and tightening of the code, and also renamed the method.
2. I removed the extra check. An also, improved the test to verify that description is truncated.
Radhika,
Thanks very much for these changes (d199bf8). I like this branch a lot. There's just one small typo in the current version: the tests add a <p/>
to the project description that should be </p>
. Please go ahead and merge with that fix. Thanks again.
- Status changed from In Progress to Resolved
Applied in changeset arvados|commit:d1f510e7fa9f1b2656c54c1e9b3ea4e4466c9d1e.
Also available in: Atom
PDF