Skip to content

Commit a418806

Browse files
authored
Merge pull request #225 from patternfly/allow-special-attrs-titles
allow special asciidoc attrs in titles
2 parents 720dbd5 + fd0cd4c commit a418806

File tree

14 files changed

+195
-1225
lines changed

14 files changed

+195
-1225
lines changed

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"description": "This library provides the quickstarts module",
66
"license": "MIT",
77
"workspaces": [
8-
"packages/*"
8+
"packages/dev",
9+
"packages/module",
10+
"packages/transform-adoc"
911
],
1012
"scripts": {
1113
"build": "yarn workspace @patternfly/quickstarts build && yarn build:adoc",
@@ -25,7 +27,7 @@
2527
"test:a11y": "patternfly-a11y --config patternfly-a11y.config"
2628
},
2729
"devDependencies": {
28-
"@patternfly/patternfly-a11y": "4.2.1",
30+
"@patternfly/patternfly-a11y": "^4.3.1",
2931
"@percy/script": "^1.1.0",
3032
"@types/jest": "^26.0.14",
3133
"@typescript-eslint/eslint-plugin": "2.11.0",

packages/dev/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"serve": "serve public"
1010
},
1111
"dependencies": {
12-
"@patternfly/patternfly": "4.183.1",
12+
"@patternfly/patternfly": "^4.222.4",
1313
"@patternfly/quickstarts": "2.3.2",
1414
"@patternfly/transform-adoc": "*",
15-
"@patternfly/react-core": "^4.135.0",
15+
"@patternfly/react-core": "^4.267.6",
1616
"asciidoctor": "^2.2.1",
1717
"i18next": "^19.8.3",
1818
"i18next-browser-languagedetector": "^6.0.1",

packages/dev/src/quickstarts-data/asciidoc/getting-started-service-registry/README.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ WARNING: This content is generated by running npm --prefix .build run generate:a
99
:product-version: 1
1010
:product-long: Application Services
1111
:product: App Services
12-
:registry-product-long: Red Hat OpenShift Service Registry
12+
:registry-product-long: Red Hat OpenShift{nbsp}Service Registry
1313
:registry: Service Registry
1414
// Placeholder URL, when we get a HOST UI for the service we can put it here properly
1515
:service-url: https://console.redhat.com/application-services/streams/
@@ -72,7 +72,7 @@ ifdef::qs[]
7272
Learn how to create and set up your first {registry} instance in {registry-product-long}.
7373

7474
[#introduction]
75-
Welcome to the quick start for {registry-product-long}. In this quick start, you'll learn how to create and view a {registry} instance, create a schema in this instance, and create a service account to connect an application or service to this instance.
75+
Welcome to the quick{nbsp}start for {registry-product-long}. In this quick start, you'll learn how to create and view a {registry} instance, create a schema in this instance, and create a service account to connect an application or service to this instance.
7676
endif::[]
7777

7878
[id="proc-creating-service-registry-instance_{context}"]

packages/module/package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,18 @@
4747
"showdown": ">=1.8.6"
4848
},
4949
"dependencies": {
50-
"@patternfly/react-catalog-view-extension": "4.12.15",
50+
"@patternfly/react-catalog-view-extension": "^4.93.15",
5151
"dompurify": "^2.2.6",
5252
"history": "^5.0.0",
5353
"showdown": "1.8.6"
5454
},
5555
"devDependencies": {
56-
"@patternfly/patternfly": "4.122.2",
57-
"@patternfly/react-core": "4.135.15",
58-
"@patternfly/react-icons": "4.11.4",
59-
"@patternfly/react-styles": "4.11.4",
60-
"@patternfly/react-tokens": "4.12.5",
56+
"@patternfly/documentation-framework": "1.0.2",
57+
"@patternfly/patternfly": "^4.222.4",
58+
"@patternfly/react-core": "^4.267.6",
59+
"@patternfly/react-icons": "4.93.6",
60+
"@patternfly/react-styles": "4.92.6",
61+
"@patternfly/react-tokens": "4.94.6",
6162
"@rollup/plugin-commonjs": "^17.0.0",
6263
"@rollup/plugin-json": "^4.1.0",
6364
"@rollup/plugin-node-resolve": "^11.1.0",
@@ -71,10 +72,10 @@
7172
"@types/react-dom": "^16.8.0",
7273
"clean-css-cli": "^4.3.0",
7374
"concat-files": "^0.1.1",
75+
"dart-sass": "^1.25.0",
7476
"enzyme": "^3.7.0",
7577
"enzyme-adapter-react-16": "^1.15.5",
7678
"enzyme-to-json": "^3.6.1",
77-
"node-sass": "^6.0.1",
7879
"node-sass-glob-importer": "^5.3.2",
7980
"prettier": "^2.1.2",
8081
"purgecss": "^4.0.0",
@@ -92,7 +93,6 @@
9293
"rollup-plugin-typescript2": "^0.29.0",
9394
"rollup-plugin-visualizer": "^5.5.0",
9495
"sass": "^1.35.2",
95-
"tslib": "^2.0.3",
96-
"@patternfly/documentation-framework": "1.0.2"
96+
"tslib": "^2.0.3"
9797
}
9898
}

packages/module/rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const commonPlugins = [
2525
const includePaths = ['node_modules/', '../../node_modules/'];
2626
const commonScssOptions = {
2727
includePaths,
28-
sass: require('node-sass'),
28+
sass: require('sass'),
2929
importer: globImporter(),
3030
};
3131

packages/module/src/ConsoleInternal/components/catalog/_catalog.scss

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use 'sass:math';
2+
13
// frontend/public/style/_vars.scss
24
$font-size-base: 14px;
35
$pfext-m-catalog-tile-height: 100%;
@@ -104,11 +106,11 @@ $catalog-tile-width: $pfext-m-catalog-tile-width;
104106
border: 1px solid var(--pf-global--BorderColor--300);
105107
display: flex;
106108
flex: 1;
107-
padding-top: ($grid-gutter-width / 2);
109+
padding-top: math.div($grid-gutter-width, 2);
108110

109111
&--with-sidebar {
110-
margin: 0 ($grid-gutter-width / 2);
111-
padding-bottom: ($grid-gutter-width / 2);
112+
margin: 0 math.div($grid-gutter-width, 2);
113+
padding-bottom: math.div($grid-gutter-width, 2);
112114
}
113115

114116
&__btn-group__group-by {
@@ -123,7 +125,7 @@ $catalog-tile-width: $pfext-m-catalog-tile-width;
123125

124126
&__description {
125127
margin-top: -10px;
126-
padding: 0 ($grid-gutter-width / 2) 10px;
128+
padding: 0 math.div($grid-gutter-width, 2) 10px;
127129
@media (min-width: $grid-float-breakpoint) {
128130
padding-left: $grid-gutter-width;
129131
padding-right: $grid-gutter-width;
@@ -296,7 +298,7 @@ $catalog-tile-width: $pfext-m-catalog-tile-width;
296298

297299
&__tabs {
298300
flex: 0 0 220px;
299-
margin: 0 ($grid-gutter-width / 2) 0 0;
301+
margin: 0 math.div($grid-gutter-width, 2) 0 0;
300302
}
301303
}
302304

packages/module/src/QuickStartPanelContent.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import QuickStartController from './QuickStartController';
1515
import { QuickStartContext, QuickStartContextValues } from './utils/quick-start-context';
1616
import { QuickStart } from './utils/quick-start-types';
1717
import { camelize } from './utils/quick-start-utils';
18+
import { removeParagraphWrap } from './QuickStartMarkdownView';
19+
import { markdownConvert } from './ConsoleInternal/components/markdown-view';
1820

1921
type HandleClose = () => void;
2022

@@ -112,7 +114,11 @@ const QuickStartPanelContent: React.FC<QuickStartPanelContentProps> = ({
112114
className="pfext-quick-start-panel-content__name"
113115
style={{ marginRight: 'var(--pf-global--spacer--md)' }}
114116
>
115-
{quickStart?.spec.displayName}{' '}
117+
<span
118+
dangerouslySetInnerHTML={{
119+
__html: removeParagraphWrap(markdownConvert(quickStart?.spec.displayName)),
120+
}}
121+
/>{' '}
116122
<small className="pfext-quick-start-panel-content__duration">
117123
{quickStart?.spec.durationMinutes
118124
? getResource(

packages/module/src/catalog/QuickStartTileHeader.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import OutlinedClockIcon from '@patternfly/react-icons/dist/js/icons/outlined-cl
55
import { StatusIcon } from '@console/shared';
66
import { QuickStartContext, QuickStartContextValues } from '../utils/quick-start-context';
77
import { QuickStartStatus, QuickStartType } from '../utils/quick-start-types';
8+
import QuickStartMarkdownView from '../QuickStartMarkdownView';
89

910
type QuickStartTileHeaderProps = {
1011
status: string;
@@ -38,7 +39,7 @@ const QuickStartTileHeader: React.FC<QuickStartTileHeaderProps> = ({
3839
return (
3940
<div className="pfext-quick-start-tile-header">
4041
<Title headingLevel="h3" data-test="title" id={quickStartId}>
41-
{name}
42+
<QuickStartMarkdownView content={name} />
4243
</Title>
4344
<div className="pfext-quick-start-tile-header__status">
4445
{type && (

packages/module/src/styles/legacy-bootstrap/_code.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use 'sass:math';
2+
13
//
24
// Code (inline and block)
35
// --------------------------------------------------
@@ -21,8 +23,8 @@ code {
2123
// Blocks of code
2224
pre {
2325
display: block;
24-
padding: (($line-height-computed - 1) / 2);
25-
margin: 0 0 ($line-height-computed / 2);
26+
padding: math.div($line-height-computed - 1, 2);
27+
margin: 0 0 math.div($line-height-computed, 2);
2628
font-size: ($font-size-base - 1); // 14px to 13px
2729
line-height: $line-height-base;
2830
color: $pre-color;

packages/module/src/styles/legacy-bootstrap/_type.scss

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use 'sass:math';
2+
13
//
24
// Typography
35
// --------------------------------------------------
@@ -18,13 +20,13 @@ h1, .h1,
1820
h2, .h2,
1921
h3, .h3 {
2022
margin-top: $line-height-computed;
21-
margin-bottom: ($line-height-computed / 2);
23+
margin-bottom: math.div($line-height-computed, 2);
2224
}
2325
h4, .h4,
2426
h5, .h5,
2527
h6, .h6 {
26-
margin-top: ($line-height-computed / 2);
27-
margin-bottom: ($line-height-computed / 2);
28+
margin-top: math.div($line-height-computed, 2);
29+
margin-bottom: math.div($line-height-computed, 2);
2830
}
2931

3032
h1, .h1 { font-size: $font-size-h1; }
@@ -39,7 +41,7 @@ h6, .h6 { font-size: $font-size-h6; }
3941
// -------------------------
4042

4143
p {
42-
margin: 0 0 ($line-height-computed / 2);
44+
margin: 0 0 math.div($line-height-computed, 2);
4345
}
4446

4547

@@ -50,7 +52,7 @@ p {
5052
ul,
5153
ol {
5254
margin-top: 0;
53-
margin-bottom: ($line-height-computed / 2);
55+
margin-bottom: math.div($line-height-computed, 2);
5456
ul,
5557
ol {
5658
margin-bottom: 0;
@@ -75,7 +77,7 @@ dd {
7577

7678
// Blockquotes
7779
blockquote {
78-
padding: ($line-height-computed / 2) $line-height-computed;
80+
padding: math.div($line-height-computed, 2) $line-height-computed;
7981
margin: 0 0 $line-height-computed;
8082
font-size: $blockquote-font-size;
8183
border-left: 5px solid $blockquote-border-color;

0 commit comments

Comments
 (0)