-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
Add inplace edit for timeline name #12000
Add inplace edit for timeline name #12000
Conversation
Reviewing this PR |
ang/crmCaseType.css
Outdated
@@ -32,6 +34,14 @@ | |||
width: 10em; | |||
} | |||
|
|||
.crmCaseType-edit-actset { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use .crmCaseType__activitySet-label--edit
:
- no need to shorten the name.
- you could either use BEM
.crmCaseType__activitySet-label--edit
or follow the convention in the file:.crmCaseType .edit-activitySet-label
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following existing convention, crmCaseType-edit-activity-set
ang/crmCaseType.css
Outdated
border: 0 !important; | ||
border-bottom: 1px solid #666 !important; | ||
box-sizing: border-box; | ||
float: left; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is float: left
important?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not required. Removed. Apologies.
ang/crmCaseType/edit.html
Outdated
<a href="#acttab-{{$index}}"> | ||
<span ng-if="!activitySet.isInEditMode">{{ activitySet.label }}</span> | ||
<input ng-if="activitySet.isInEditMode" | ||
class="crmCaseType-edit-actset" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please refer to the class name comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please refer above comment.
ang/crmCaseType/edit.html
Outdated
<span class="crm-i fa-trash" title="{{ts('Remove')}}" | ||
ng-hide="activitySet.name == 'standard_timeline'" | ||
ng-click="removeItem(caseType.definition.activitySets, activitySet)">{{ts('Remove')}}</span> | ||
ng-click="removeItem(caseType.definition.activitySets, activitySet)"></span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you remove this text? I know it's not visible anyways, but maybe it was there for accessibility reasons (not 100% sure).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was visible before, but I removed it to save space. It is also mentioned in the DOC
Removed the "Remove" label from the trash icon, because otherwise it was taking lot of space.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah right sorry 🤦♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For accessibility, I suggest adding back a title "Remove Activity Set"
@deb1990 please see core example of edit in place - we should use the same approach: This can be found on a clean CiviCRM on the activity tab of the contact record. We should also make sure this change we are making is suitable for Shoreditch theme. |
Since this is an Angular context, I think we should move this code into core and out of the Case extension, as it is generally applicable. |
@colemanw @jamienovick I was investigating about the
In this case, the activity set name is not part of an entity per se, but part of some definition data that is stored as XML for the case type. The solution I'm providing in this commit: adea3e2 makes the activity set name to look a bit more like Please let me know if this is satisfactory. |
I'm happy if Coleman is. Looks good great job. |
I tried it out and the UX is slightly odd. I would expect that:
|
e37530e
to
9a99ed2
Compare
|
edab16b
to
ec3fc22
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you click twice on the title it exits the edit mode. Can this be fixed?
ec3fc22
to
43740a0
Compare
@reneolivo this is fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @reneolivo |
ang/crmCaseType.css
Outdated
text-align: center; | ||
width: 30px; | ||
z-index: 1; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why this is necessary. If you reuse the classes from standard crm-editable then these buttons should "just work" and when a theme like Shoreditch comes in to restyle everything it won't need to make a special extra bit of css just for these 2 buttons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
@reneolivo in the future please do not add merge commits to a PR. If you need to pull in changes from To tidy things up, I've rebased & squashed this PR into a single commit. |
ffdd363
to
d7a470d
Compare
@civicrm-builder retest this please |
1 similar comment
@civicrm-builder retest this please |
Test fails look related PhantomJS 2.1.1 (Linux 0.0.0).crmCaseType crmEditableTabTitle when ESCAPE key is pressed while typing.shows the pen icon |
@colemanw @eileenmcnaughton Fixed the unit tests. |
merging per label |
Included in CiviCRM 5.1.2 Core PR: civicrm#12000
Included in CiviCRM 5.1.2 Core PR: civicrm#12000
Included in CiviCRM 5.3.0 Core PR: civicrm#12000
Included in CiviCRM 5.3.0 Core PR: civicrm#12000
Overview
This PR adds the following features to the New Case Type page.
Before
After
Technical Details
ang/crmCaseType/activitySetDetails.html
file is removed, as we dont need the advanced section anymore.In
ang/crmCaseType/edit.html
Remove
label is removed from trash icon.crmEditableTabTitle
directive has been created to make the tab title editable also it supports