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-23831: As a UI dev, I need format of RichText field over REST to be semantically enhanced xhtml5 #1435

Merged
merged 4 commits into from Oct 8, 2015

Conversation

5 participants
@pspanja
Copy link
Contributor

commented Oct 2, 2015

This PR resolves https://jira.ez.no/browse/EZP-23831

This replaces usage of custom elements in xhtml5edit format with standard XHTML5 elements.
Replaced elements are only those relating to embeds:

  • ezlink => link
  • ezconfig => span
  • ezvalue => span
  • ezembed => div
  • ezembedinline => span

Template elements are also affected but skipped here as they are not in the current scope from the UI side and there seems to be some questions to answer there first.

Using same elements in different context is done through data-ezelement attribute. A format like that can't be properly described using XSD, which will become a problem when template elements are handled in the same way. This could be described using RelaxNG and/or Schematron.

@pspanja

This comment has been minimized.

Copy link
Contributor Author

commented Oct 2, 2015

Review ping @dpobel @andrerom @bdunogier @lolautruche

POV on schema appreciated, do we need it here in the first place?

<xsl:template match="docbook:ezembed">
<xsl:element name="div" namespace="{$outputNamespace}">
<xsl:attribute name="data-ezelement">
<xsl:value-of select="'ezembed'"/>

This comment has been minimized.

Copy link
@dpobel

dpobel Oct 2, 2015

Contributor

nitpick: can be simplified to

<xsl:attribute name="data-ezelement">ezembed</xsl:attribute>

This comment has been minimized.

Copy link
@pspanja

pspanja Oct 5, 2015

Author Contributor

Simplified in 0f2c9f6

@lolautruche

This comment has been minimized.

Copy link
Contributor

commented Oct 2, 2015

Looks good AFAICT

<ezlink href="ezlocation://202" class="linkClass2"/>
</ezembed>
<div data-ezelement="ezembed" href="ezcontent://106" id="embed-id-1" data-ezview="embed" class="embed-class" data-ezalign="left">
<a data-ezelement="ezlink" href="ezurl://95#fragment1" target="_blank" id="link-id-1" title="Link title" class="link-class"/>

This comment has been minimized.

Copy link
@dpobel

dpobel Oct 2, 2015

Contributor

it's a weird markup, to improve it a bit, I would rather use a link tag here. According to http://www.w3.org/html/wg/drafts/html/master/semantics.html#the-link-element, it should have an itemprop attribute, I suggest to set its value to url and that also means the div has to have an itemscope attribute as well.

This comment has been minimized.

Copy link
@pspanja

pspanja Oct 2, 2015

Author Contributor

Isn't that element supposed to occur only in metadata content (head)?

This comment has been minimized.

Copy link
@andrerom

andrerom Oct 2, 2015

Member

see: http://www.w3.org/html/wg/drafts/html/master/dom.html#phrasing-content-2
When it has itemprop it can be used as phrasing-content.

This comment has been minimized.

Copy link
@pspanja

pspanja Oct 5, 2015

Author Contributor

Got it, updated in 4eba931.

@andrerom

This comment has been minimized.

Copy link
Member

commented Oct 2, 2015

Looks, good so far, I'm a bit concerned by usage of same tag for different things, but I'm also aware we should stay as close to the format supported by editor as possible to avoid tons of issues over the next couple of years (see ezoe).

@dpobel dpobel referenced this pull request Oct 2, 2015

Merged

EZP-24894: Configure the embed element in the RichText editor #359

8 of 8 tasks complete
@pspanja

This comment has been minimized.

Copy link
Contributor Author

commented Oct 5, 2015

Removed schema for http://ez.no/namespaces/ezpublish5/xhtml5/edit in 1da8dd2.
I assumed everyone is ok with that.

@pspanja

This comment has been minimized.

Copy link
Contributor Author

commented Oct 5, 2015

All remarks taken care of BTW :)

git review --continue

@glye

This comment has been minimized.

Copy link
Member

commented Oct 5, 2015

+1 fwiw, simplification sounds good.

@andrerom

This comment has been minimized.

Copy link
Member

commented Oct 5, 2015

+1, side: should we consider renaming this format to xhtml5-semantic or something?

@pspanja

This comment has been minimized.

Copy link
Contributor Author

commented Oct 5, 2015

@andrerom I was thinking something in the xhtml5-edit-alloy line :)

@andrerom

This comment has been minimized.

Copy link
Member

commented Oct 5, 2015

I was thinking something in the xhtml5-edit-alloy line :)

ok, lets leave the name discussion for later, get your point :)

@pspanja pspanja force-pushed the impl-EZP-23831-xhtml5edit-xhtml5 branch from 1da8dd2 to 8c8889c Oct 8, 2015

pspanja added a commit that referenced this pull request Oct 8, 2015

Merge pull request #1435 from ezsystems/impl-EZP-23831-xhtml5edit-xhtml5
EZP-23831: As a UI dev, I need format of RichText field over REST to be semantically enhanced xhtml5

@pspanja pspanja merged commit 84aa2c0 into master Oct 8, 2015

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
ezrobot Code review by ezrobot
Details

@pspanja pspanja deleted the impl-EZP-23831-xhtml5edit-xhtml5 branch Oct 8, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.