Truncate extension descriptions

This is for #8216.

- [x] Code to toggle between original and truncated description
- [x] Visual review
- [ ] Code review
That sounds good. Maybe it could also return nothing if it doesn't need to do any truncation. It might be easier to now what the function did.