Bert Leunis pushed to branch master at cms-community / 
hippo-addon-channel-manager


Commits:
c7b5ea48 by Michael Metternich at 2018-01-27T22:25:31+01:00
CHANNELMGR-1520 Add alternative path for step 2

- - - - -
319e0e96 by Michael Metternich at 2018-01-27T22:54:53+01:00
CHANNELMGR-1520 Minor code quality improvements and license header

- - - - -
7623da55 by Michael Metternich at 2018-01-29T09:56:27+01:00
CHANNELMGR-1520 Fix all unit tests

- - - - -
19269b18 by Mathijs den Burger at 2018-01-31T22:10:29+01:00
CHANNELMGR-1520 Check all unknown fields for requiredness

Introduce the UnknownFieldType field type, to which all unknown property
fields and all fields with a non-default plugin class are mapped.
The validators or those UnknownFieldTypes are still populated so we
can check whether any of them is required.

Still to do:
- make sure compounds that only contain unknown field types are still
  filtered out (their initial isValid check does not work since they are
  not empty anymore)
- fix 14 failing unit tests

- - - - -
0d4ea076 by Mathijs den Burger at 2018-02-02T10:22:10+01:00
CHANNELMGR-1520 Merge master changes into feature/CC-CHANNELMGR-1520

- - - - -
8635de59 by Mathijs den Burger at 2018-02-02T13:06:34+01:00
CHANNELMGR-1520 Recognize compound fields explicitly

Instead of assuming that everything that's not a choice field is
a compound, we now explicit recognize compounds fields: one of their
required supertypes is always "hippo:compound". That prevents the
code from recognizing compound-like types like hippogallerypicker:imagelink
as a compound. These will now be parsed an UNKNOWN types instead,
which makes it possible to later recognize them as unknown required
types.

- - - - -
6461285b by Mathijs den Burger at 2018-02-02T13:10:21+01:00
CHANNELMGR-1520 Fix reporting of unsupported field types

They were not included anymore because FieldTypeUtils#determineFieldType
returned "Unknown" instead of an empty string for unsupported fields.

Don't include the 'unsupportedFieldTypes' property in the JSON 
output
unless it's not empty, otherwise the frontend will erroneously report
a usage statistic about it with an empty array of type names (an empty
array is truthy in JavaScript).

- - - - -
622590ec by Mathijs den Burger at 2018-02-05T12:49:37+01:00
CHANNELMGR-1520 Merge master changes into feature/CC-CHANNELMGR-1520

- - - - -
cbde8548 by Mathijs den Burger at 2018-02-05T13:47:24+01:00
CHANNELMGR-1520 Process unknown fields recursively

Renamed FieldsInformation#allRequiredFieldsIncluded to
FieldsInformation#canCreateAllRequiredFields. A required choice field is
included/supported, but still cannot be created since there's no way yet
to add one of the choices in the UI.

Unknown fields in compounds (and compounds in compounds, etc.) are now
also noted.

Removed the UnknownFieldType again. It was only used for processing the
FieldsInformation, which can also be done without creating a FieldType
class via reflection.

- - - - -
83d1818d by Mathijs den Burger at 2018-02-05T14:00:55+01:00
CHANNELMGR-1520 Process unknown field types while initializing fields

- - - - -
d5f2575a by Mathijs den Burger at 2018-02-05T16:39:28+01:00
CHANNELMGR-1520 Report unknown choices too

Move the logic for mapping content type names to reported type names to
the FieldsInformation class so it can easily be reused for choices.

Also removed some lingering 'UNKNOWN' fields code.

- - - - -
5fb74cc6 by Mathijs den Burger at 2018-02-05T16:44:32+01:00
CHANNELMGR-1520 Use 'canCreateAllRequiredFields' property in frontend

Instead of 'allRequiredFieldsIncluded'.

- - - - -
fc0ff305 by Mathijs den Burger at 2018-02-06T09:59:05+01:00
CHANNELMGR-1520 Re-enable caching of document types

Disabled during development.

- - - - -
569c45d8 by Mathijs den Burger at 2018-02-06T12:42:22+01:00
CHANNELMGR-1520 Add FieldsInformation tests

Simplified #addUnknownField as a result, which only needs a content type
item instead of a full field type context.

- - - - -
d7d2c973 by Mathijs den Burger at 2018-02-06T13:11:57+01:00
CHANNELMGR-1520 Implement equals and hashCode for FieldsInformation

Useful in unit tests.

- - - - -
0b99edf9 by Mathijs den Burger at 2018-02-06T13:21:04+01:00
CHANNELMGR-1520 Adjust ChoiceFieldUtils tests

- - - - -
7f003c18 by Mathijs den Burger at 2018-02-06T14:44:17+01:00
CHANNELMGR-1520 Fix ChoiceFieldType tests

- - - - -
326d7672 by Mathijs den Burger at 2018-02-06T14:47:31+01:00
CHANNELMGR-1520 Adjust AbstractFieldType tests

- - - - -
3b43b73e by Mathijs den Burger at 2018-02-07T10:18:36+01:00
CHANNELMGR-1520 Adjust FieldTypeUtils tests

The following fields will now be reported as "Custom" in the list of
unsupported field types:

- fields of an unknown type
- fields of a known type without an editor config node
- fields of a known type, but with a non-default plugin class
- fields of a known type that use an unknown validator (known in the
  code as "invalid" fields)

Rationale: all these cases indicate some customization in an end
project. We could add more specific usage statistics in the future to
track these individual cases.

- - - - -
0d510df9 by Mathijs den Burger at 2018-02-07T10:28:34+01:00
CHANNELMGR-1520 Use PowerMock#createMock so replayAll/verifyAll is enough

All mocks created with PowerMock#createMock are automatically replayed
with PowerMock#replayAll and verified with PowerMock#verifyAll, so no
error prone list of mocks needs to be passed to EasyMock#verify.

- - - - -
a3da2fc2 by Mathijs den Burger at 2018-02-07T10:36:53+01:00
CHANNELMGR-1520 Adjust DocumentTypesServiceImpl tests

- - - - -
18b82579 by Mathijs den Burger at 2018-02-07T13:16:28+01:00
CHANNELMGR-1520 Ignore empty compounds

An empty compound by itself should not be reported as an unsupported
custom field, and should not lead to the 'not all fields of this
document are shown' message.

- - - - -
2e573a32 by Mathijs den Burger at 2018-02-07T15:40:57+01:00
CHANNELMGR-1520 Fix lint error

- - - - -
aec8d318 by Mathijs den Burger at 2018-02-07T15:56:50+01:00
CHANNELMGR-1520 Remove unused mock method

- - - - -
79188423 by Mathijs den Burger at 2018-02-07T16:09:55+01:00
CHANNELMGR-1520 Move 'alternative step 2' logic outside content editor

The message shown above the content editor differs in state
'edit-content' and 'create-content-step-2'. Instead of having 
the
content editor know both messages, transclude the message and show it
based on a single input property 'showMessage'. This also removes the
need for the 'switchEditor' callback, since each state template
completely owns the message on top of the content editor and any
behavior attached to it.

Whether to allow saving now depends on an additional input parameter
'allowSave'. In 'edit-content' state saving is always allowed, 
but in
'create-content-step-2' it depends on whether all required fields in
the document type can be created.

- - - - -
60074cca by Mathijs den Burger at 2018-02-07T16:26:11+01:00
CHANNELMGR-1698 Continue draft version in content perspective

Two bugs prevented this from working:

- publish the event before closing the editor, otherwise the documentId
  is already deleted and we're publishing an event without a documentId.

- remember we're switching editors, otherwise the uiCanExit check tries
  to show the confirmation dialog, which will resolve directly because
  the editor is already closed, and then always delete the document
  (which makes it impossible to continue editing).

- - - - -
8d9afee9 by Bert Leunis at 2018-02-08T10:20:12+01:00
CHANNELMGR-1520 Merge master changes in feature/CC-CHANNELMGR-1520

- - - - -
bbe07f37 by Mathijs den Burger at 2018-02-09T14:41:10+01:00
CHANNELMGR-1520 Don't include empty compound fields in document types

An empty compound field is not "valid" but does not contain any
unsupported validator either. In that case the field should be not
reported as an "unknown" one, but it should not be included in the
document type either.

- - - - -
71de9731 by Mathijs den Burger at 2018-02-09T16:38:48+01:00
CHANNELMGR-1520 Include field info of empty (invalid) compounds

A compound may be empty, which makes it invalid, so it is not included
in the document type. However, the compound may be empty because it
only contains unsupported fields. This fields information of such
a compound should therefore be added, otherwise those unsupported fields
are not reported nor included in the overall fields information. This
means that the fields information when initializing a field should
always be added, regardless whether the field is valid, since it may
contain information about other unsupported fields.

- - - - -
9309a17a by Mathijs den Burger at 2018-02-09T16:48:31+01:00
CHANNELMGR-1520 Merge master changes in feature/CC-CHANNELMGR-1520

- - - - -
610862b8 by Bert Leunis at 2018-02-12T11:46:59+01:00
CHANNELMGR-1520 rename isValid to isSupported for fields. Gives some variables 
more clear names.

That a field has a status "valid" or not was confusing. It is 
supported by the editor in the channel manager or not, so that is better 
described by isSupported. The "isValid" lingo is now only used 
regarding field validation.

- - - - -
a66e8493 by Bert Leunis at 2018-02-12T11:48:53+01:00
CHANNELMGR-1520 Reintegrate feature/CC-CHANNELMGR-1520

- - - - -


30 changed files:

- 
content-service/src/main/java/org/onehippo/cms/channelmanager/content/documenttype/DocumentTypesServiceImpl.java
- 
content-service/src/main/java/org/onehippo/cms/channelmanager/content/documenttype/field/FieldTypeFactory.java
- 
content-service/src/main/java/org/onehippo/cms/channelmanager/content/documenttype/field/FieldTypeUtils.java
- 
content-service/src/main/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/AbstractFieldType.java
- 
content-service/src/main/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/ChoiceFieldType.java
- 
content-service/src/main/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/ChoiceFieldUtils.java
- 
content-service/src/main/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/CompoundFieldType.java
- 
content-service/src/main/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/FieldType.java
- + 
content-service/src/main/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/FieldsInformation.java
- 
content-service/src/main/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/FormattedTextFieldType.java
- 
content-service/src/main/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/RichTextFieldType.java
- 
content-service/src/main/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/StringFieldType.java
- 
content-service/src/main/java/org/onehippo/cms/channelmanager/content/documenttype/model/DocumentType.java
- 
content-service/src/test/java/org/onehippo/cms/channelmanager/content/documenttype/DocumentTypesServiceImplTest.java
- 
content-service/src/test/java/org/onehippo/cms/channelmanager/content/documenttype/field/FieldTypeUtilsTest.java
- 
content-service/src/test/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/AbstractFieldTypeTest.java
- 
content-service/src/test/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/ChoiceFieldTypeTest.java
- 
content-service/src/test/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/ChoiceFieldUtilsTest.java
- 
content-service/src/test/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/CompoundFieldTypeTest.java
- + 
content-service/src/test/java/org/onehippo/cms/channelmanager/content/documenttype/field/type/FieldsInformationTest.java
- 
frontend-ng/src/app/channel/sidePanels/rightSidePanel/contentEditor/contentEditor.component.js
- 
frontend-ng/src/app/channel/sidePanels/rightSidePanel/contentEditor/contentEditor.controller.js
- 
frontend-ng/src/app/channel/sidePanels/rightSidePanel/contentEditor/contentEditor.html
- 
frontend-ng/src/app/channel/sidePanels/rightSidePanel/contentEditor/contentEditor.spec.js
- 
frontend-ng/src/app/channel/sidePanels/rightSidePanel/createContent/step2/step2.controller.js
- 
frontend-ng/src/app/channel/sidePanels/rightSidePanel/createContent/step2/step2.controller.spec.js
- 
frontend-ng/src/app/channel/sidePanels/rightSidePanel/createContent/step2/step2.html
- 
frontend-ng/src/app/channel/sidePanels/rightSidePanel/editContent/editContentMain.controller.js
- 
frontend-ng/src/app/channel/sidePanels/rightSidePanel/editContent/editContentMain.html
- 
frontend-ng/src/app/channel/sidePanels/rightSidePanel/editContent/editContentMain.spec.js


The diff was not included because it is too large.


View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/compare/839e16b2bb323205a13a44fbc24ed69c67b59f04...a66e84935714f0b8c197a0eef0fb978f6cedf913

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/compare/839e16b2bb323205a13a44fbc24ed69c67b59f04...a66e84935714f0b8c197a0eef0fb978f6cedf913
You're receiving this email because of your account on code.onehippo.org.
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to