Skip to content

Commit e86bfd1

Browse files
stif59100anooparveti
authored andcommitted
feat(generator.css): migration bootstrap to tailwindcss
ref:MANAGER-11981 Signed-off-by: stif59100 <[email protected]>
1 parent 3e3482e commit e86bfd1

File tree

21 files changed

+132
-262
lines changed

21 files changed

+132
-262
lines changed

.stylelintrc.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@
33
"plugins": ["stylelint-scss"],
44
"rules": {
55
"at-rule-no-unknown": null,
6+
"scss/at-rule-no-unknown": [
7+
true,
8+
{
9+
"ignoreAtRules": ["tailwind"]
10+
}
11+
],
612
"function-calc-no-invalid": null,
713
"prettier/prettier": true,
8-
"scss/at-rule-no-unknown": true,
914
"selector-type-no-unknown": [
1015
true,
1116
{

packages/manager/core/generator/app/conditional-templates/dashboard/[serviceName]/Tabs1.tsx

+15-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { lazy } from 'react';
22
import { MscBillingTile } from '@ovhcloud/msc-react-billing-tile';
3-
import { useParams, } from 'react-router-dom';
3+
import { useParams } from 'react-router-dom';
44
import { useEnvironment } from '@ovh-ux/manager-react-core-application';
55
import { Locale } from '@ovhcloud/msc-utils';
66

@@ -10,8 +10,20 @@ function Tabs1() {
1010
const { serviceName } = useParams();
1111

1212
return (
13-
<div className="dashboard-section pt-4">
14-
<div>
13+
<div className="grid xs:grid-cols-1 sm:grid-cols-2 md:grid-cols-3 py-6">
14+
<div className="p-3">
15+
<MscBillingTile
16+
servicePath={`{{this.apiPath}}/${serviceName}`}
17+
locale={locale}
18+
/>
19+
</div>
20+
<div className="p-3">
21+
<MscBillingTile
22+
servicePath={`{{this.apiPath}}/${serviceName}`}
23+
locale={locale}
24+
/>
25+
</div>
26+
<div className="p-3">
1527
<MscBillingTile
1628
servicePath={`{{this.apiPath}}/${serviceName}`}
1729
locale={locale}

packages/manager/core/generator/app/conditional-templates/dashboard/[serviceName]/Tabs1/TileExemple.tsx

-92
This file was deleted.

packages/manager/core/generator/app/conditional-templates/onboarding/index.scss

-10
This file was deleted.

packages/manager/core/generator/app/conditional-templates/onboarding/index.tsx.hbs

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { Locale } from '@ovhcloud/msc-utils';
1010
import useGuideUtils from '@/components/GuideLink/guide-utils';
1111
import { OnboardingLayout } from '@/components/layout-helpers/Onboarding';
1212
import onboardingImgSrc from './onboarding-img.png';
13-
import './index.scss';
1413

1514
export default function Onboarding() {
1615
const { t } = useTranslation('{{appName}}/onboarding');
@@ -56,7 +55,7 @@ export default function Onboarding() {
5655
moreInfoButtonLabel={t('moreInfoButtonLabel')}
5756
moreInfoHref={t('moreInfoButtonLink')}
5857
>
59-
<aside className="tile-grid">
58+
<aside className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-8 pt-12">
6059
{tileList.map((tile) => (
6160
<MscTile
6261
key={tile.tileTitle}

packages/manager/core/generator/app/templates/package.json.hbs

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@
3131
"@ovhcloud/ods-common-theming": "^16.0.1",
3232
"@ovhcloud/ods-theme-blue-jeans": "^16.0.1",
3333
"@tanstack/react-query": "^4.29.3",
34-
"bootstrap": "^5.3.0",
3534
"@tanstack/react-query-devtools": "^4.9.0",
3635
"clsx": "^1.2.1",
3736
"react": "^18.2.0",
3837
"react-i18next": "^11.18.1",
3938
"react-router-dom": "^6.3.0",
40-
"i18next": "^20.4.0"
39+
"i18next": "^20.4.0",
40+
"tailwindcss": "^3.3.3"
4141
},
4242
"devDependencies": {
4343
"@ovh-ux/manager-vite-config": "*",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
6+
};

packages/manager/core/generator/app/templates/src/components/ButtonTooltip/ButtonTooltip.scss

-22
This file was deleted.

packages/manager/core/generator/app/templates/src/components/ButtonTooltip/ButtonTooltip.tsx

+5-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
ODS_BUTTON_VARIANT,
88
} from '@ovhcloud/ods-components/button';
99
import { ODS_THEME_COLOR_INTENT } from '@ovhcloud/ods-common-theming';
10-
import './ButtonTooltip.scss';
1110

1211
interface TooltipItem {
1312
label: string;
@@ -62,10 +61,12 @@ const ButtonTooltip: React.FC<ButtonTooltipProps> = (props) => {
6261
/>
6362
</OsdsButton>
6463
{showTooltip && (
65-
<div ref={tooltipRef} className="tooltip">
66-
<div className="tooltip-text">
64+
<div ref={tooltipRef} className="relative inline-block left-[-80%]">
65+
<div className="absolute bg-white rounded whitespace-nowrap mt-[-4px] right-[-100%] border-2 border-gray-300 text-left z-50">
6766
{tooltipContent.map((item: TooltipItem) => (
68-
<div key={item.label}>{item.label}</div>
67+
<div key={item.label} className="px-10 py-20 cursor-pointer">
68+
{item.label}
69+
</div>
6970
))}
7071
</div>
7172
</div>

packages/manager/core/generator/app/templates/src/components/Error/Error.tsx

+3-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { ODS_BUTTON_VARIANT } from '@ovhcloud/ods-components/button';
1111
import { useShell } from '@ovh-ux/manager-react-core-application';
1212

1313
import OOPS from '../../assets/error-banner-oops.png';
14-
import './error.scss';
1514

1615
export const TRACKING_LABELS = {
1716
SERVICE_NOT_FOUND: 'service_not_found',
@@ -62,8 +61,8 @@ const ErrorBanner: React.FC<ErrorObject> = ({ error }) => {
6261
}, []);
6362

6463
return (
65-
<div className="manager-error-page p-5">
66-
<div className="manager-error-page-image">
64+
<div className="mx-auto w-full max-w-[600px] grid h-full overflow-hidden p-5">
65+
<div className="w-full">
6766
<img src={OOPS} alt="OOPS" />
6867
</div>
6968

@@ -91,7 +90,7 @@ const ErrorBanner: React.FC<ErrorObject> = ({ error }) => {
9190
</OsdsMessage>
9291
</div>
9392

94-
<div className="manager-error-page-footer py-2">
93+
<div className="text-right overflow-hidden py-2">
9594
<OsdsButton
9695
color={ODS_THEME_COLOR_INTENT.primary}
9796
variant={ODS_BUTTON_VARIANT.ghost}

packages/manager/core/generator/app/templates/src/components/Error/error.scss

-20
This file was deleted.

packages/manager/core/generator/app/templates/src/components/layout-helpers/Dashboard/Dashboard.scss

-27
This file was deleted.

packages/manager/core/generator/app/templates/src/components/layout-helpers/Dashboard/Dashboard.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import {
99
import { ODS_TEXT_LEVEL, ODS_TEXT_SIZE } from '@ovhcloud/ods-components/text';
1010
import { ODS_THEME_COLOR_INTENT } from '@ovhcloud/ods-common-theming';
1111

12-
import './Dashboard.scss';
13-
1412
export type DashboardTabItemProps = {
1513
name: string;
1614
title: string;
@@ -37,8 +35,8 @@ const Dashboard: React.FC<DashboardLayoutProps> = ({ tabs }) => {
3735
}, [location.pathname]);
3836

3937
return (
40-
<div className="dashboard-layout-helpers">
41-
<div className="dashboard-layout-subtitle py-4">
38+
<>
39+
<div className="py-4">
4240
<OsdsText
4341
level={ODS_TEXT_LEVEL.heading}
4442
color={ODS_THEME_COLOR_INTENT.text}
@@ -51,13 +49,15 @@ const Dashboard: React.FC<DashboardLayoutProps> = ({ tabs }) => {
5149
<OsdsTabBar slot="top">
5250
{tabs.map((tab: DashboardTabItemProps, key: number) => (
5351
<OsdsTabBarItem key={`osds-tab-bar-item-${key}`} panel={tab.name}>
54-
<NavLink to={tab.to}>{tab.title}</NavLink>
52+
<NavLink to={tab.to} className="no-underline">
53+
{tab.title}
54+
</NavLink>
5555
</OsdsTabBarItem>
5656
))}
5757
</OsdsTabBar>
5858
</OsdsTabs>
5959
<Outlet />
60-
</div>
60+
</>
6161
);
6262
};
6363

packages/manager/core/generator/app/templates/src/components/layout-helpers/Listing/dataGrid.scss

-15
This file was deleted.

0 commit comments

Comments
 (0)