Project

General

Profile

Actions

Task #873

closed

FE: UiUtils - improve methods for substring

Added by Radek Tomiška over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Low
Assignee:
Petr Adamec
Category:
Frontend
Target version:
Start date:
12/14/2017
Due date:
% Done:

100%

Estimated time:
2.00 h
Owner:

Description

Methods 'substringBegin', 'substringEnd' and 'substringByWord' in UiUtils on frontend can append suffix ' ...', when given text is shortened.

Example:
'Long long text' => 'Long long ...'

Add optional parameter into methods with suffix - null as default. Add frontend tests.


Related issues

Related to IdStory Identity Manager - Task #784: Component NotificationTemplateInfo - implement full and popover decoratorClosedPetr Hanák10/24/2017

Actions
Actions #1

Updated by Radek Tomiška over 6 years ago

  • Related to Task #784: Component NotificationTemplateInfo - implement full and popover decorator added
Actions #2

Updated by Ondřej Kopr over 6 years ago

  • Assignee changed from Radek Tomiška to Patrik Stloukal
Actions #3

Updated by Marcel Poul about 6 years ago

  • Assignee changed from Patrik Stloukal to Petr Adamec
Actions #4

Updated by Petr Adamec about 6 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Solution of this task is commited to branch adamecp/873-improve-methods-for-substring

Actions #5

Updated by Petr Adamec about 6 years ago

  • Status changed from Resolved to Needs feedback
  • Assignee changed from Petr Adamec to Ondřej Kopr
Actions #6

Updated by Ondřej Kopr about 6 years ago

  • Status changed from Needs feedback to In Progress
  • Assignee changed from Ondřej Kopr to Petr Adamec
  • % Done changed from 100 to 80

I made first feedback (good job, you will commit first new feature into our product :) )

  • I'm not able start FE application:
    **CzechIdMng/Realization/frontend/czechidm-core/src/components/basic/ShortText/ShortText.js
      29:69  error  A space is required after ','  comma-spacing
      29:70  error  Strings must use singlequote   quotes
      31:67  error  A space is required after ','  comma-spacing
      31:68  error  Strings must use singlequote   quotes
    
    **CzechIdMng/Realization/frontend/czechidm-core/src/utils/UiUtils.js
      187:9   error  Keyword "if" must be followed by whitespace  space-after-keywords
      187:35  error  Missing space before opening brace           space-before-blocks
      188:18  error  Strings must use singlequote                 quotes
      217:9   error  Keyword "if" must be followed by whitespace  space-after-keywords
      217:35  error  Missing space before opening brace           space-before-blocks
      218:18  error  Strings must use singlequote                 quotes
    

    you don't probably set up eslint validation in your IDE, try check this guide: https://wiki.czechidm.com/7.6/dev/quickstart/ide/atom atom is good IDE for developing our FE devstack, or try something else with eslint plugin eg: sublimetext.
  • change czech language in test to english (if you find some czech words in test, feel free to update it into english :)

after you fix eslint issues and czech words give me this ticket back I will continue with feedback.

Actions #7

Updated by Petr Adamec about 6 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Petr Adamec to Ondřej Kopr
  • % Done changed from 80 to 100

add space after comma, change czech words

Actions #8

Updated by Ondřej Kopr about 6 years ago

  • % Done changed from 100 to 90

I made second review, all these things are already fixed:

  • parameter suffix should be null as describes Radek in the task, but I'm ok with your solution,
  • you missed still some czech words in comments.

Thank you for change these methods.

One think for next time, when you add some ticket to review set it 90% not 100% and please add some information about commits and branch, where I find your solution :)

my commit: https://github.com/bcvsolutions/CzechIdMng/commit/040b045527e8dd98e99f9258a2e4e0dcc8f721fc
pull request: https://github.com/bcvsolutions/CzechIdMng/pull/14

Please Radek could you check his solution?

Actions #9

Updated by Ondřej Kopr about 6 years ago

  • Assignee changed from Ondřej Kopr to Radek Tomiška
Actions #10

Updated by Radek Tomiška about 6 years ago

  • Status changed from Needs feedback to Closed
  • Assignee changed from Radek Tomiška to Petr Adamec
  • Target version set to Garnet (7.7.0)

I fixed short methods, when empty string is given. Thx for methods improving. I fixed short methods, when empty string is given. Thx for methods improving. I added these methods on all places in app (where todos were).

Actions #11

Updated by Radek Tomiška about 6 years ago

  • % Done changed from 90 to 100
Actions

Also available in: Atom PDF