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

OEL-753: Integrate inpage navigation #137

Merged
merged 41 commits into from
Jan 7, 2022
Merged

OEL-753: Integrate inpage navigation #137

merged 41 commits into from
Jan 7, 2022

Conversation

abel-santos-corral
Copy link
Contributor

@abel-santos-corral abel-santos-corral commented Dec 7, 2021

Jira issue(s):

(!) Don't merge until OEL-824 is merged at 1.x.

kits/default/package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
escuriola
escuriola previously approved these changes Dec 20, 2021
Copy link
Contributor

@drishu drishu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also check drone before you send this to review!

@drishu drishu changed the title OEL-753: [BCL patterns][Paragraphs] - Inpage navigation OEL-753: Integrate inpage navigation Jan 4, 2022
$links_label = $sub_paragraph->get('field_oe_text')->first()->value;
}
elseif ($sub_paragraph->hasField('field_oe_plain_text_long') && !$sub_paragraph->get('field_oe_plain_text_long')->isEmpty()) {
$links_label = $sub_paragraph->get('field_oe_plain_text_long')->first()->value;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally you should check first since you wrote the code, I did and indeed it can be way to long, this is a bad idea, we should use just field_oe_title

drishu
drishu previously approved these changes Jan 7, 2022
@@ -0,0 +1,27 @@
inpage_navigation:
label: "Inpage navigation"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use single quotes for this and below

type: "render"
label: "Content"
description: "Content part of the inpage navigation."
preview: "<h2 id='item-1'>Heading 1</h2><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ut imperdiet neque, finibus pretium metus. Mauris sed consequat purus, eget facilisis arcu. Vestibulum accumsan turpis sed dui placerat, in varius turpis consequat. Pellentesque porta id lorem sit amet efficitur. Sed id ipsum quis metus venenatis facilisis sit amet at mi.</p><h2 id='item-2'>Heading 2 with a long title going on several lines</h2><p>Ut placerat tellus dui, ut tempor orci pulvinar eget. Maecenas hendrerit risus vel tempus tincidunt. Suspendisse vitae ante nibh. Ut faucibus porttitor dui, sit amet pharetra nulla aliquam non. Donec massa mauris, convallis quis nunc nec, ultrices dapibus urna. In vel elementum ipsum, luctus volutpat odio. Maecenas aliquet justo in purus placerat dictum.</p><h2 id='item-3'>Heading 3</h2><p>Curabitur vehicula accumsan placerat. Aliquam eget tincidunt ex, sed elementum justo. Sed faucibus ultrices finibus. Vivamus pellentesque nisl ac interdum ultrices. Quisque ornare sit amet est sed pretium. Aliquam eu leo vitae nisi egestas volutpat ut non lectus. Sed condimentum tempus semper.</p><h2 id='item-4'>Heading 4</h2><p>Nullam dignissim quam tellus, eget pretium tortor vulputate quis. In vehicula enim vitae lorem fermentum convallis. Phasellus bibendum, turpis sit amet faucibus interdum, dui lorem iaculis enim, ac eleifend odio tellus eget dolor. Maecenas nunc ante, tincidunt nec risus ut, eleifend tempor nisi.</p>"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Single quotes please.

'#type': pattern
'#id': inpage_navigation
'#fields':
title: "Page content"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Single quotes

'title': title,
'links': links,
'content': content,
'id': 'bcl-inpage-navigation',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is not needed because component hardcoded the id

description: 'Inpage navigation adds a navigation element and content element so when scrolling the active element is indicated in the nav part.'
fields:
title:
type: 'text'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In 799 I'm leaving types without quotes because of reading on IDE, the type has a different color and improve my reading. This is a convention from myself and can be discussed if you want.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed with Francesco, he is agree doing in this way.

@drishu drishu merged commit 1b75d4a into 1.x Jan 7, 2022
@drishu drishu deleted the OEL-753 branch January 7, 2022 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants