Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EZP-29115: Add characters counter to RichText #741

Merged

Conversation

konradoboza
Copy link
Member

@konradoboza konradoboza commented Dec 10, 2018

Question Answer
Tickets https://jira.ez.no/browse/EZP-29115
Bug fix? no
New feature? yes
BC breaks? no
Tests pass? yes
Doc needed? yes
License GPL-2.0

This PR contains a proof of concept for one of the features which was requested by the customer. This is a simple characters counter which is enabled/disabled globally for RichText via User Preferences. The idea is to count all characters inside tags except:

  • custom tags,
  • embeds,
  • images.

The matter of styling and configuration could be changed, it is rather a basic idea which in my opinion seems to be consistent with the rest of the back office. However all feedback will be warmly welcomed. :) Below I attached some screenshot which presents current state of the feature:

counter

user_settings

changing_visibility

User settings were moved to ezplatform-user repository, so it is dependant on: ezsystems/ezplatform-user#8

Checklist:

  • Coding standards ($ composer fix-cs)
  • Ready for Code Review
  • nested custom tags handling

@konradoboza konradoboza force-pushed the EZP-29115-characters_counter branch from 59273f8 to fbe42d0 Compare December 10, 2018 10:40
@ezsystems ezsystems deleted a comment from ezrobot Dec 10, 2018
@konradoboza konradoboza self-assigned this Dec 13, 2018
@konradoboza konradoboza force-pushed the EZP-29115-characters_counter branch from 440fa04 to beb0da3 Compare January 24, 2019 08:00
@konradoboza konradoboza force-pushed the EZP-29115-characters_counter branch from beb0da3 to 10c4110 Compare January 24, 2019 08:03
konradoboza and others added 2 commits February 22, 2019 22:00
@konradoboza konradoboza force-pushed the EZP-29115-characters_counter branch from b24b93f to 64544f8 Compare February 27, 2019 15:15
@ezsystems ezsystems deleted a comment from ezrobot Feb 27, 2019
@ezsystems ezsystems deleted a comment from ezrobot Feb 27, 2019
@konradoboza konradoboza force-pushed the EZP-29115-characters_counter branch 2 times, most recently from bd29b96 to c24476c Compare February 27, 2019 15:29
@ezsystems ezsystems deleted a comment from ezrobot Feb 27, 2019
@konradoboza konradoboza force-pushed the EZP-29115-characters_counter branch from c24476c to 72ebea0 Compare February 27, 2019 15:38
@ezsystems ezsystems deleted a comment from ezrobot Feb 27, 2019
Copy link
Contributor

@DominikaK DominikaK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for strings

@konradoboza konradoboza force-pushed the EZP-29115-characters_counter branch from 74b7bde to 4b869c8 Compare March 1, 2019 14:22
@konradoboza konradoboza changed the title [POC] EZP-29115: Add characters counter to RichText [WIP] EZP-29115: Add characters counter to RichText Mar 1, 2019
@konradoboza konradoboza removed the request for review from andrerom March 1, 2019 14:24
@konradoboza konradoboza requested review from dew326 and tischsoic and removed request for SylvainGuittard March 1, 2019 14:24
@konradoboza
Copy link
Member Author

User settings part was extracted to ezplatform-user repository, ref: ezsystems/ezplatform-user#8.

Implementation was moved from the plugin to base-rich-text.js as suggested by @dew326. Counting characters inside custom tags need to be improved.

@konradoboza konradoboza force-pushed the EZP-29115-characters_counter branch from 8122a46 to 2faa4a6 Compare March 4, 2019 14:04
@konradoboza konradoboza force-pushed the EZP-29115-characters_counter branch from 2faa4a6 to d1c4b20 Compare March 4, 2019 14:05
@konradoboza konradoboza changed the title [WIP] EZP-29115: Add characters counter to RichText EZP-29115: Add characters counter to RichText Mar 4, 2019
@konradoboza
Copy link
Member Author

@dew326 remarks applied, please take a look.

@konradoboza
Copy link
Member Author

ping @adamwojs @dew326 @tischsoic

@@ -61,6 +61,36 @@
<target state="new">Sub-items</target>
<note>key: settings.subitems_limit.value.title</note>
</trans-unit>
<trans-unit id="98400a7e546231a994f6fea03dce3ebd52c1c33d" resname="settings.character_counter.value.description">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to my self: This file should be moved to ezplatform-user.

@lserwatka lserwatka merged commit 5e8434f into ezsystems:master Mar 4, 2019
konradoboza added a commit to konradoboza/ezplatform-admin-ui that referenced this pull request May 29, 2019
* EZP-29115: Add characters counter to RichText

* removed implementation from plugin, moved user settings part to a separate PR

* fixes after CR

* fixes after review vol.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

5 participants