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

EPMRPP-90473 || Report Launch as Important #3830

Merged
merged 1 commit into from
May 10, 2024
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
20 changes: 20 additions & 0 deletions app/src/common/constants/retentionPolicy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright 2024 EPAM Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

export const RETENTION_POLICY = {
REGULAR: 'REGULAR',
IMPORTANT: 'IMPORTANT',
};
5 changes: 5 additions & 0 deletions app/src/common/img/star-inline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions app/src/pages/inside/common/itemInfo/itemInfo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ import {
} from 'controllers/plugins';
import { IN_PROGRESS } from 'common/constants/testStatuses';
import { ANALYZER_TYPES } from 'common/constants/analyzerTypes';
import { RETENTION_POLICY } from 'common/constants/retentionPolicy';
import { MarkdownViewer } from 'components/main/markdown';
import { LAUNCHES_PAGE_EVENTS } from 'components/main/analytics/events';
import { PLUGIN_NAME_TITLES } from 'components/integrations';
import { getSauceLabsConfig } from 'components/integrations/integrationProviders/sauceLabsIntegration/utils';
import { formatMethodType, formatStatus } from 'common/utils/localizationUtils';
import PencilIcon from 'common/img/pencil-icon-inline.svg';
import RetryIcon from 'common/img/retry-inline.svg';
import StarIcon from 'common/img/star-inline.svg';
import SauceLabsIcon from 'common/img/plugins/sauce-labs-gray.png';
import { NameLink } from 'pages/inside/common/nameLink';
import { DurationBlock } from 'pages/inside/common/durationBlock';
Expand Down Expand Up @@ -195,6 +197,12 @@ export class ItemInfo extends Component {
</div>

<div className={cx('additional-info')}>
{value.retentionPolicy === RETENTION_POLICY.IMPORTANT && (
<span className={cx('retention-policy')}>
<div className={cx('star-icon')}>{Parser(StarIcon)}</div>
Copy link
Member

Choose a reason for hiding this comment

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

Let's follow the correct HTML structure and don't put block elements inside the inline elements.
I suppose the div here can be easily replaced by span.
W3C recommendation, community discussions

Important
</span>
)}
{value.status !== IN_PROGRESS &&
customProps.withExtensions &&
extensions.map((extension) => (
Expand Down
16 changes: 16 additions & 0 deletions app/src/pages/inside/common/itemInfo/itemInfo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,22 @@
}
}

.retention-policy {
height: 18px;
padding-right: 20px;
color: $COLOR--gray-60;
font-size: 12px;
font-family: $FONT-REGULAR;
}

.star-icon {
display: inline-block;
height: 16px;
width: 16px;
padding-right: 4px;
vertical-align: text-bottom;
}

.retry-icon {
display: inline-block;
height: 15px;
Expand Down
Loading