Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • XSweet XSweet
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 46
    • Issues 46
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • XSweet
  • XSweetXSweet
  • Issues
  • #172

Closed
Open
Created Jul 21, 2020 by Alex Theg@athegOwner

Track changes target format for Wax 2

@christos is working on the next version of the Wax editor for Editoria, and it will include some changes to the way certain elements are coded. We had laid out the current format of TCs in #162 (closed); going forward, this issue will serve as the reference for the expected target format.

Rather than using a <track-change> element, track changes will be a <span> tag with a class describing the specific type of change:

  • <span class="insertion">
  • <span class="deletion">
  • <span class="format-change">

Track change elements will have the following attributes:

  • data-id: A unique identifier string. There is no specific requirement for the format, just that something's passed in.
  • data-user: A unique identifier string for the user. There is no specific format required, but something does need to be passed in. Down the line, this is going to change to data-userid.
  • data-username: When changes are made within the editor, this will be the user's username. We won't have access to usernames since we're coming from Word, so pass in the author name as-is.
  • data-date: the date of the change, in the format ____
  • data-group: what part of the content the change happened in. Either "main" or else "____"

For formatting track changes, these two additional attributes will apply:

  • data-before: The format before the change. As a starting point, there is no need to pass in anything here and it's fine to omit the tag altogether.
  • data-after: The formatting change that has been made. More important than the data-before attribute.

If data-id and data-group are both omitted, then the right-hand side track change pane won't show the change (see attached screenshot), and the change will only appear inline. This would be fine as a starting point. side_callout

Example:

<p class="paragraph">
  <strong>
    <span class="format-change"
          data-id="9b863ae5-a1ba-4714-93e9-3674b3ef3edf"
          data-user="1234"
          data-username="demo"
          data-date="5316364"
          data-before="[]"
          data-after="["strong"]"
          data-group="main">
      this
    </span>
  </strong>
  is a paragraph.
</p>

@christos, here are some questions I have:

  1. Is this correct, that TCs will be a <span> rather than a <p> tag?
  2. What format does the date need to be in?
  3. What are the possible values for data-group? main and what? Do we need to include this in what we pass in?
  4. Can I get a check about when the side callout won't be available? Are the two relevant fields data-id and data-group? Do both need to be missing before the side callout won't show up, or just one? If I'm wrong, can you correct what I wrote above by the screenshot?
  5. We're going to have the data-before data. Is there any reason not to include it if we already have it?
Edited Jul 21, 2020 by Alex Theg
Assignee
Assign to
Time tracking