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

Two-way bound attributes are required in a2j-template #55

Open
chasenlehara opened this issue Dec 14, 2021 · 0 comments
Open

Two-way bound attributes are required in a2j-template #55

chasenlehara opened this issue Dec 14, 2021 · 0 comments

Comments

@chasenlehara
Copy link

chasenlehara commented Dec 14, 2021

While working on #56, I realized that after running the tests from the CLI, Testee would hang in an infinite loop in Firefox. This was consistently repeatable with this template:

{ tag: 'a2j-repeat-loop',
state: {}
},
{ tag: 'a2j-rich-text',
state: {
userContent: 'User\'s last name <a2j-variable name="Client last name TE" />.'
}
},
{ tag: 'a2j-rich-text',
state: {
userContent: `<p><em>Lorem ipsum dolor sit amet, pri ad porro consul
disputando. Mea tale admodum cu, soluta fuisset per ad. Te omittam
noluisse consequat vel. Impetus appetere antiopam sit ut, at nec
inani forensibus necessitatibus. Eu eum appetere facilisis reprimique,
an sit ignota fierent invenire, duis denique sea an. Sit ceteros
dolores inimicus ut, nec id tantas delenit phaedrum. Nullam prompta
sit ne.</em></p>`
}
}

@mikemitchel and I noticed this two-way binding of an attribute that was not present in the fixture:

notes:bind="childNode.state.notes"

After adding notes: '' to the fixture (see the PR above), the tests would pass and Testee would not get caught in an infinite loop.

chasenlehara pushed a commit that referenced this issue Dec 14, 2021
Previously, a template’s custom header and footer were not part of the generated HTML preview at all.

Now, the headers and footers are included in the SSR page when the `renderTemplateFootersAndHeaders` attribute is `true`. This will allow us to conditionally turn on the headers and footers when DAT renders the HTML preview but not when it’s generating the PDF.

This adds a number of attributes to one of the existing templates because they are required for the template to successfully render; see this issue for more info: #55

Part of #53
chasenlehara pushed a commit that referenced this issue Dec 15, 2021
Previously, a template’s custom header and footer were not part of the generated HTML preview at all.

Now, the headers and footers are included in the SSR page when the `renderTemplateFootersAndHeaders` attribute is `true`. This will allow us to conditionally turn on the headers and footers when DAT renders the HTML preview but not when it’s generating the PDF.

This adds a number of attributes to one of the existing templates because they are required for the template to successfully render; see this issue for more info: #55

Part of #53
chasenlehara pushed a commit that referenced this issue Dec 16, 2021
Previously, a template’s custom header and footer were not part of the generated HTML preview at all.

Now, the headers and footers are included in the SSR page when the `renderTemplateFootersAndHeaders` attribute is `true`. This will allow us to conditionally turn on the headers and footers when DAT renders the HTML preview but not when it’s generating the PDF.

This adds a number of attributes to one of the existing templates because they are required for the template to successfully render; see this issue for more info: #55

Part of #53
mikemitchel pushed a commit that referenced this issue Mar 24, 2022
* #125 restore user progress (#42)

* html-entities package added

* for extracting visited pages from answers model

* Updated test html-entities

* minor changes to test case

Co-authored-by: Anubhav Dhingra <[email protected]>

* remove unused dependancy

* 7.0.19

* updated scope for decodeHTMLEntities

* 7.0.20

* #193 test assemble error (#44)

* syntax update

* bug fix

Co-authored-by: Anubhav Dhingra <[email protected]>

* 7.0.21

* 117 conditional logic dat styling (#45)

* styling change for conditional form

* updated stylesheet

* cleanup

Co-authored-by: Anubhav Dhingra <[email protected]>

* WIP: template header footer duplicate names (#47)

Co-authored-by: Anubhav Dhingra <[email protected]>

* add stripHtml() util to string.js (#50)

* 7.0.22

* author136 - add name tag to unassigned fields (#48)

* add name tag to unassigned fields

* unique id with unidentified fields

* linting cleanup

* counter for unassigned variables

Co-authored-by: Anubhav Dhingra <[email protected]>
Co-authored-by: mitch <[email protected]>

* Communicate “page breaks” via more than just styles #51

Previously, the page break element was not perceivable to screen readers because it rendered no text.

Now, some text will be in the DOM for screen readers to read, while the visual representation of the page break has not changed.

Closes #51

* Move testee to its own npm script

This allows the tests to be run without running the linter, which is sometimes useful during development.

* Add custom headers and footers to the generated document

Previously, a template’s custom header and footer were not part of the generated HTML preview at all.

Now, the headers and footers are included in the SSR page when the `renderTemplateFootersAndHeaders` attribute is `true`. This will allow us to conditionally turn on the headers and footers when DAT renders the HTML preview but not when it’s generating the PDF.

This adds a number of attributes to one of the existing templates because they are required for the template to successfully render; see this issue for more info: #55

Part of #53

* Remove the use of list elements for non-lists

This changes `<a2j-template>` to use `<section>` elements instead of `<li>` elements.

Unfortunately I was not able to add tests for this change. I wanted to use FuncUnit’s [drag](https://funcunit.com/docs/FuncUnit.prototype.drag.html) method for testing the drag & drop functionality, but I believe it might expect to be used when dragging an element into another element, whereas this component reorders elements in the same parent. It might be possible to add tests for this in the future with more investigation.

Closes #52

* 7.1.0

* 7.1.1-0

* Update README.md

* add textindent plugin to ckeditor (#63)

* 7.1.1

Co-authored-by: AnubhavDhingra <[email protected]>
Co-authored-by: Anubhav Dhingra <[email protected]>
Co-authored-by: Chasen Le Hara <[email protected]>
Co-authored-by: Tobias Nteireho <[email protected]>
Co-authored-by: John Mayer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant