A new function is created to achieve this, Text::truncate
which is based on Text::cut from the text.class.php helper.
Limit is set to 60 characters.
Example A:
1. Content has over 60 characters.
2. Title = First 60 characters + remaining characters of the last word + '...'
Example B:
1. Content has less than or equal to 60 characters
2. Title = All.
Example C:
1. Content only has one word but is over 60 characters.
2. Title = First 60 characters + '...'
Why B and C differ from each other?
Because we do not want the whole that one weird word
with over 60 characters to make its way to the title.
It's probably unrealistic, the code can be much cleaner
with B and C combined.
Feel free to discuss.
This is to ensure that the area will be comaptible
with any text editor plugins.
I have tested with SimpleMDE and Quill. Both worked
completely fine.
Bonus: Added description of Quill's English locale.
This is to keep some distance from the plugin name, especially in narrower
screens or when the browser window is resized to be narrower. It ensures
the placement still looks neat :)
Signed-off-by: ADTC <send2adtc@gmail.com>
An unchecked checkbox icon is used for Activate (to show that it's
currently inactive). A checked checkbox icon is used for Deactivate (to
show that it's currently active). A gear icon is used for the Settings
link.
The checkbox icons are placed on the left side of the name, as checkboxes
usually appear. The gear icon is placed floated to the right side of the
name, to have a clean look.
The plugin list is more compact, and it's much easier to identify which
plugins are currently active, and which have settings. No need to read
any words!
The previously used words (with language dependency) is still used as the
tooltip (title) that is shown when the mouse hovers over the icons.
In the themes page, the checked checkbox icon denotes the curently active
theme, but doesn't do anything when clicked. This is by design, since only
one theme can be active at a time. For consistency sake, a circle (radio
button style) was not used.
Signed-off-by: ADTC <send2adtc@gmail.com>