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

Use same warning icons that jenkins.io is using #1152

Merged
merged 4 commits into from
Apr 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"scripts": {
"lint": "yarn workspaces foreach -t -p -v -i run lint",
"test": "yarn workspaces foreach -t -p -v -i run test",
"build": "yarn workspaces foreach -t -p -v -i run build"
"build": "yarn workspaces foreach -t -p -v -i run build",
"dev": "yarn workspace @jenkins-cd/jenkins-plugin-site dev"
},
"workspaces": [
"plugins/*"
Expand Down
7 changes: 6 additions & 1 deletion plugins/plugin-site/makeLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ async function makeReactLayout() {
'viewbox': 'viewBox',
'xlink:href': 'xlinkHref',
'xmlns:xlink': 'xmlnsXlink',
'nomodule': 'noModule'
};

const nodeConversions = {
Expand Down Expand Up @@ -168,8 +169,12 @@ async function makeReactLayout() {
jsxLines.push(' <Helmet>');
$('head').children(':not(link[rel="stylesheet"])').each((_, child) => handleNode(child, 2));
$('head').children('link[rel="stylesheet"]').each((_, child) => handleNode(child, 2));
$('head').children('script').each((_, child) => handleNode(child, 2));
jsxLines.push(' </Helmet>');
$('body').children(':not(script)').each((_, child) => handleNode(child, 0));
jsxLines.push(' <Helmet>');
$('body').children('script').each((_, child) => handleNode(child, 2));
jsxLines.push(' </Helmet>');
$('body').children().each((_, child) => handleNode(child, 0));
jsxLines.push(' </div>');
jsxLines.push(' );');

Expand Down
3 changes: 1 addition & 2 deletions plugins/plugin-site/src/components/PluginActiveWarnings.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import WarningsIcon from './WarningsIcon';
import PropTypes from 'prop-types';

function PluginActiveWarnings({securityWarnings}) {
Expand All @@ -13,7 +12,7 @@ function PluginActiveWarnings({securityWarnings}) {
}
return (
<div className="alert alert-danger alert-with-icon">
<WarningsIcon />
<ion-icon class="alert-icon" name="warning" />
{active.length == 1 ? singleWarning(active[0]) : multipleWarnings(active)}
</div>
);
Expand Down
5 changes: 2 additions & 3 deletions plugins/plugin-site/src/components/PluginGovernanceStatus.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
import WarningsIcon from './WarningsIcon';

function PluginGovernanceStatus({plugin}) {
if (!plugin || !plugin.labels) {
Expand All @@ -10,7 +9,7 @@ function PluginGovernanceStatus({plugin}) {
if (id === 'adopt-this-plugin') {
return (
<div className="alert alert-warning alert-with-icon" key={id}>
<WarningsIcon />
<ion-icon class="alert-icon" name="warning" />
<b>This plugin is up for adoption!</b>
{' We are looking for new maintainers. Visit our '}
<a href="https://jenkins.io/doc/developer/plugin-governance/adopt-a-plugin/">Adopt a Plugin</a>
Expand All @@ -20,7 +19,7 @@ function PluginGovernanceStatus({plugin}) {
} else if (id === 'deprecated') {
return (
<div className="alert alert-warning alert-with-icon" key={id}>
<WarningsIcon />
<ion-icon class="alert-icon" name="warning" />
<p>
<b>Deprecated:</b>
{'This plugin has been marked as '}
Expand Down
1 change: 1 addition & 0 deletions plugins/plugin-site/src/components/ReportAProblem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ function ReportAProblem({reportProblemTitle, reportProblemUrl, reportProblemRela
return (
<p className="box">
<a href={reportProblemUrl.includes('://') ? reportProblemUrl : pluginSiteReportUrl} title={title}>
<ion-icon class="report" name="warning" />
Report a problem
</a>
</p>
Expand Down
12 changes: 0 additions & 12 deletions plugins/plugin-site/src/components/WarningsIcon.jsx

This file was deleted.

1 change: 0 additions & 1 deletion plugins/plugin-site/src/images/warning.svg

This file was deleted.

3 changes: 1 addition & 2 deletions plugins/plugin-site/src/templates/tombstone.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import React from 'react';
import PropTypes from 'prop-types';
import Layout from '../layout';
import SEO from '../components/SEO';
import WarningsIcon from '../components/WarningsIcon';

function TombstonePage({data: {suspendedPlugin: plugin}}) {
const pluginPage = 'templates/plugin.jsx';
Expand All @@ -22,7 +21,7 @@ function TombstonePage({data: {suspendedPlugin: plugin}}) {
</div>
</div>
<div className="alert alert-warning alert-with-icon">
<WarningsIcon/>
<ion-icon class="alert-icon" name="warning" />
{'Plugin distribution has been suspended, see '}
<a href={plugin.url}>{plugin.url.replace('https://issues.jenkins.io/browse/', '')}</a>
{' for details.'}
Expand Down