Skip to content

Commit

Permalink
Merge pull request #699 from lblod/rdfa-awareness
Browse files Browse the repository at this point in the history
Enable rdfa-aware setting on remaining (non rdfa-aware) nodes
  • Loading branch information
elpoelma authored Aug 27, 2024
2 parents a358421 + 2386e7e commit 74c91a4
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilled-bears-trade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'frontend-gelinkt-notuleren': minor
---

agendapoint editor: enable rdfa-aware `doc`, `heading` and `link` nodes
5 changes: 5 additions & 0 deletions .changeset/eleven-panthers-melt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'frontend-gelinkt-notuleren': minor
---

meeting intro/outro editors: enable rdfa-aware nodes
5 changes: 5 additions & 0 deletions .changeset/empty-rocks-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'frontend-gelinkt-notuleren': minor
---

regulatory-statement editor: enable rdfa-aware `link` nodes
27 changes: 16 additions & 11 deletions app/components/zitting-text-document-container.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ import {
import { highlight } from '@lblod/ember-rdfa-editor/plugins/highlight/marks/highlight';
import { color } from '@lblod/ember-rdfa-editor/plugins/color/marks/color';
import {
block_rdfa,
blockRdfaWithConfig,
docWithConfig,
hard_break,
horizontal_rule,
invisible_rdfa,
invisibleRdfaWithConfig,
paragraph,
repaired_block,
repairedBlockWithConfig,
text,
} from '@lblod/ember-rdfa-editor/nodes';
import {
Expand All @@ -36,11 +36,10 @@ import {
orderedListWithConfig,
} from '@lblod/ember-rdfa-editor/plugins/list';
import { placeholder } from '@lblod/ember-rdfa-editor/plugins/placeholder';
import { heading } from '@lblod/ember-rdfa-editor/plugins/heading';
import { headingWithConfig } from '@lblod/ember-rdfa-editor/plugins/heading';
import { blockquote } from '@lblod/ember-rdfa-editor/plugins/blockquote';
import { code_block } from '@lblod/ember-rdfa-editor/plugins/code';
import { image } from '@lblod/ember-rdfa-editor/plugins/image';
import { inline_rdfa } from '@lblod/ember-rdfa-editor/marks';
import {
date,
dateView,
Expand All @@ -49,6 +48,10 @@ import {
import { service } from '@ember/service';
import { linkPasteHandler } from '@lblod/ember-rdfa-editor/plugins/link';
import { tracked } from '@glimmer/tracking';
import {
inlineRdfaWithConfig,
inlineRdfaWithConfigView,
} from '@lblod/ember-rdfa-editor/nodes/inline-rdfa';

export default class ZittingTextDocumentContainerComponent extends Component {
@service intl;
Expand All @@ -68,28 +71,28 @@ export default class ZittingTextDocumentContainerComponent extends Component {

schema = new Schema({
nodes: {
doc: docWithConfig(),
doc: docWithConfig({ rdfaAware: true }),
paragraph,
repaired_block,
repaired_block: repairedBlockWithConfig({ rdfaAware: true }),
list_item: listItemWithConfig({ enableHierarchicalList: true }),
ordered_list: orderedListWithConfig({ enableHierarchicalList: true }),
bullet_list: bulletListWithConfig({ enableHierarchicalList: true }),
placeholder,
...tableNodes({ tableGroup: 'block', cellContent: 'block+' }),
date: date(this.config.date),
heading,
heading: headingWithConfig({ rdfaAware: true }),
blockquote,
horizontal_rule,
code_block,
text,
image,
hard_break,
invisible_rdfa,
block_rdfa,
invisible_rdfa: invisibleRdfaWithConfig({ rdfaAware: true }),
block_rdfa: blockRdfaWithConfig({ rdfaAware: true }),
inline_rdfa: inlineRdfaWithConfig({ rdfaAware: true }),
link: link(this.config.link),
},
marks: {
inline_rdfa,
em,
strong,
underline,
Expand Down Expand Up @@ -134,6 +137,7 @@ export default class ZittingTextDocumentContainerComponent extends Component {
return {
link: {
interactive: true,
rdfaAware: true,
},
date: {
placeholder: {
Expand Down Expand Up @@ -173,6 +177,7 @@ export default class ZittingTextDocumentContainerComponent extends Component {
return {
link: linkView(this.config.link)(controller),
date: dateView(this.config.date)(controller),
inline_rdfa: inlineRdfaWithConfigView({ rdfaAware: true })(controller),
};
};
}
Expand Down
7 changes: 4 additions & 3 deletions app/controllers/agendapoints/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import {
orderedListWithConfig,
} from '@lblod/ember-rdfa-editor/plugins/list';
import { placeholder } from '@lblod/ember-rdfa-editor/plugins/placeholder';
import { heading } from '@lblod/ember-rdfa-editor/plugins/heading';
import { headingWithConfig } from '@lblod/ember-rdfa-editor/plugins/heading';
import { blockquote } from '@lblod/ember-rdfa-editor/plugins/blockquote';
import { code_block } from '@lblod/ember-rdfa-editor/plugins/code';
import { image, imageView } from '@lblod/ember-rdfa-editor/plugins/image';
Expand Down Expand Up @@ -130,7 +130,7 @@ export default class AgendapointsEditController extends Controller {
SnippetInsert = SnippetInsertRdfaComponent;
schema = new Schema({
nodes: {
doc: docWithConfig(),
doc: docWithConfig({ rdfaAware: true }),
paragraph,
repaired_block: repairedBlockWithConfig({ rdfaAware: true }),
structure,
Expand All @@ -148,7 +148,7 @@ export default class AgendapointsEditController extends Controller {
location,
codelist,
roadsign_regulation,
heading,
heading: headingWithConfig({ rdfaAware: true }),
blockquote,
snippet_placeholder: snippetPlaceholder,
snippet: snippet(this.config.snippet),
Expand Down Expand Up @@ -207,6 +207,7 @@ export default class AgendapointsEditController extends Controller {
},
link: {
interactive: true,
rdfaAware: true,
},
roadsignRegulation: {
endpoint: ENV.mowRegistryEndpoint,
Expand Down
1 change: 1 addition & 0 deletions app/controllers/regulatory-statements/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ export default class RegulatoryStatementsRoute extends Controller {
},
link: {
interactive: true,
rdfaAware: true,
},
structures: STRUCTURE_SPECS,
worship: {
Expand Down

0 comments on commit 74c91a4

Please sign in to comment.