Skip to content
This repository was archived by the owner on Oct 31, 2025. It is now read-only.

Commit 7ae97c0

Browse files
nbalnefeanil
authored andcommitted
fix: updated button styles to consistent rectangular design
1 parent 8fa2526 commit 7ae97c0

File tree

15 files changed

+14640
-11135
lines changed

15 files changed

+14640
-11135
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
24
1+
20

package-lock.json

Lines changed: 14403 additions & 10872 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
"jsx-to-string": "1.4.0",
4242
"moment": "2.30.1",
4343
"moment-timezone": "0.5.48",
44-
"postcss": "8.5.6",
4544
"papaparse": "^5.5.2",
45+
"postcss": "8.5.6",
4646
"prop-types": "15.8.1",
4747
"query-string": "7.1.3",
4848
"react": "^18.3.1",
@@ -52,6 +52,7 @@
5252
"react-copy-to-clipboard": "5.1.0",
5353
"react-dom": "^18.3.1",
5454
"react-helmet": "6.1.0",
55+
"react-intl": "^6.8.9",
5556
"react-redux": "7.2.9",
5657
"react-router": "6.30.1",
5758
"react-router-dom": "6.30.1",

src/components/BulkOperationDetailsPage/BulkOperationDetails.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ const BulkOperationDetails = ({ task }) => {
119119
</a>
120120
<Button
121121
variant="primary"
122-
className="PreviewCSV"
122+
className="preview_csv"
123123
onClick={() => {
124124
handlePreviewCSV();
125125
open();

src/components/BulkOperationDetailsPage/styles.scss

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,27 @@ $cell-widths: 220px;
5858
}
5959
}
6060

61-
.download {
62-
border-radius: 0;
61+
.btn.download,
62+
button.preview_csv,
63+
.pgn__button.preview_csv {
64+
border-radius: 0 !important;
6365
font-weight: bold;
6466
border: 1px solid #ddd;
6567
font-size: 16px;
66-
}
68+
transition: none !important;
6769

68-
.preview_csv {
69-
border-radius: 0;
70-
font-weight: 550;
71-
font-size: 16px;
70+
&:hover,
71+
&:focus,
72+
&:active,
73+
&:visited {
74+
border-radius: 0 !important;
75+
outline: none !important;
76+
box-shadow: none !important;
77+
transition: none !important;
78+
}
79+
80+
&::before,
81+
&::after {
82+
border-radius: 0 !important;
83+
}
7284
}

src/components/CreateCoursePage/CreateCoursePage.test.jsx

Lines changed: 140 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { render } from '@testing-library/react';
33
import { Provider } from 'react-redux';
44
import configureStore from 'redux-mock-store';
55
import { MemoryRouter } from 'react-router-dom';
6+
import { IntlProvider } from 'react-intl';
67
import CreateCoursePage from './index';
78
import { courseOptions, courseRunOptions } from '../../data/constants/testData';
89

@@ -16,7 +17,9 @@ describe('CreateCoursePage', () => {
1617
const { container } = render(
1718
<Provider store={store}>
1819
<MemoryRouter>
19-
<CreateCoursePage courseOptions={courseOptions} courseRunOptions={courseRunOptions} />
20+
<IntlProvider locale="en" messages={{}}>
21+
<CreateCoursePage courseOptions={courseOptions} courseRunOptions={courseRunOptions} />
22+
</IntlProvider>
2023
</MemoryRouter>
2124
</Provider>,
2225
);
@@ -27,27 +30,29 @@ describe('CreateCoursePage', () => {
2730
const { container } = render(
2831
<Provider store={store}>
2932
<MemoryRouter>
30-
<CreateCoursePage
31-
courseOptions={courseOptions}
32-
courseRunOptions={courseRunOptions}
33-
fetchOrganizations={() => null}
34-
publisherUserInfo={{
35-
organizations: [],
36-
error: null,
37-
isFetching: true,
38-
}}
39-
productSourceOptions={{
40-
productSources: [],
41-
error: null,
42-
isFetching: true,
43-
}}
44-
courseInfo={{
45-
error: null,
46-
isCreating: false,
47-
data: {},
48-
}}
49-
createCourse={() => null}
50-
/>
33+
<IntlProvider locale="en" messages={{}}>
34+
<CreateCoursePage
35+
courseOptions={courseOptions}
36+
courseRunOptions={courseRunOptions}
37+
fetchOrganizations={() => null}
38+
publisherUserInfo={{
39+
organizations: [],
40+
error: null,
41+
isFetching: true,
42+
}}
43+
productSourceOptions={{
44+
productSources: [],
45+
error: null,
46+
isFetching: true,
47+
}}
48+
courseInfo={{
49+
error: null,
50+
isCreating: false,
51+
data: {},
52+
}}
53+
createCourse={() => null}
54+
/>
55+
</IntlProvider>
5156
</MemoryRouter>
5257
</Provider>,
5358
);
@@ -58,27 +63,29 @@ describe('CreateCoursePage', () => {
5863
const { container } = render(
5964
<Provider store={store}>
6065
<MemoryRouter>
61-
<CreateCoursePage
62-
courseOptions={courseOptions}
63-
courseRunOptions={courseRunOptions}
64-
fetchOrganizations={() => null}
65-
publisherUserInfo={{
66-
organizations,
67-
error: null,
68-
isFetching: false,
69-
}}
70-
productSourceOptions={{
71-
productSources: sources,
72-
error: null,
73-
isFetching: false,
74-
}}
75-
courseInfo={{
76-
error: null,
77-
isCreating: false,
78-
data: {},
79-
}}
80-
createCourse={() => null}
81-
/>
66+
<IntlProvider locale="en" messages={{}}>
67+
<CreateCoursePage
68+
courseOptions={courseOptions}
69+
courseRunOptions={courseRunOptions}
70+
fetchOrganizations={() => null}
71+
publisherUserInfo={{
72+
organizations,
73+
error: null,
74+
isFetching: false,
75+
}}
76+
productSourceOptions={{
77+
productSources: sources,
78+
error: null,
79+
isFetching: false,
80+
}}
81+
courseInfo={{
82+
error: null,
83+
isCreating: false,
84+
data: {},
85+
}}
86+
createCourse={() => null}
87+
/>
88+
</IntlProvider>
8289
</MemoryRouter>
8390
</Provider>,
8491
);
@@ -89,22 +96,24 @@ describe('CreateCoursePage', () => {
8996
const { container } = render(
9097
<Provider store={store}>
9198
<MemoryRouter>
92-
<CreateCoursePage
93-
courseOptions={courseOptions}
94-
courseRunOptions={courseRunOptions}
95-
fetchOrganizations={() => null}
96-
publisherUserInfo={{
97-
organizations,
98-
error: ['Fail'],
99-
isFetching: false,
100-
}}
101-
courseInfo={{
102-
error: null,
103-
isCreating: false,
104-
data: {},
105-
}}
106-
createCourse={() => null}
107-
/>
99+
<IntlProvider locale="en" messages={{}}>
100+
<CreateCoursePage
101+
courseOptions={courseOptions}
102+
courseRunOptions={courseRunOptions}
103+
fetchOrganizations={() => null}
104+
publisherUserInfo={{
105+
organizations,
106+
error: ['Fail'],
107+
isFetching: false,
108+
}}
109+
courseInfo={{
110+
error: null,
111+
isCreating: false,
112+
data: {},
113+
}}
114+
createCourse={() => null}
115+
/>
116+
</IntlProvider>
108117
</MemoryRouter>
109118
</Provider>,
110119
);
@@ -114,18 +123,20 @@ describe('CreateCoursePage', () => {
114123
const { container } = render(
115124
<Provider store={store}>
116125
<MemoryRouter>
117-
<CreateCoursePage
118-
courseOptions={courseOptions}
119-
courseRunOptions={courseRunOptions}
120-
fetchOrganizations={() => null}
121-
courseInfo={{
122-
error: null,
123-
isCreating: false,
124-
data: {},
125-
}}
126-
createCourse={() => null}
127-
publisherUserInfo={null}
128-
/>
126+
<IntlProvider locale="en" messages={{}}>
127+
<CreateCoursePage
128+
courseOptions={courseOptions}
129+
courseRunOptions={courseRunOptions}
130+
fetchOrganizations={() => null}
131+
courseInfo={{
132+
error: null,
133+
isCreating: false,
134+
data: {},
135+
}}
136+
createCourse={() => null}
137+
publisherUserInfo={null}
138+
/>
139+
</IntlProvider>
129140
</MemoryRouter>
130141
</Provider>,
131142
);
@@ -135,22 +146,24 @@ describe('CreateCoursePage', () => {
135146
const { container } = render(
136147
<Provider store={store}>
137148
<MemoryRouter>
138-
<CreateCoursePage
139-
courseOptions={courseOptions}
140-
courseRunOptions={courseRunOptions}
141-
fetchOrganizations={() => null}
142-
publisherUserInfo={{
143-
organizations,
144-
error: null,
145-
isFetching: false,
146-
}}
147-
courseInfo={{
148-
error: ['Fail'],
149-
isCreating: false,
150-
data: {},
151-
}}
152-
createCourse={() => null}
153-
/>
149+
<IntlProvider locale="en" messages={{}}>
150+
<CreateCoursePage
151+
courseOptions={courseOptions}
152+
courseRunOptions={courseRunOptions}
153+
fetchOrganizations={() => null}
154+
publisherUserInfo={{
155+
organizations,
156+
error: null,
157+
isFetching: false,
158+
}}
159+
courseInfo={{
160+
error: ['Fail'],
161+
isCreating: false,
162+
data: {},
163+
}}
164+
createCourse={() => null}
165+
/>
166+
</IntlProvider>
154167
</MemoryRouter>
155168
</Provider>,
156169
);
@@ -160,24 +173,26 @@ describe('CreateCoursePage', () => {
160173
const { container } = render(
161174
<Provider store={store}>
162175
<MemoryRouter>
163-
<CreateCoursePage
164-
courseOptions={courseOptions}
165-
courseRunOptions={courseRunOptions}
166-
fetchOrganizations={() => null}
167-
publisherUserInfo={{
168-
organizations,
169-
error: null,
170-
isFetching: false,
171-
}}
172-
courseInfo={{
173-
error: null,
174-
isCreating: false,
175-
data: {
176-
uuid: '11111111-1111-1111-1111-111111111111',
177-
},
178-
}}
179-
createCourse={() => null}
180-
/>
176+
<IntlProvider locale="en" messages={{}}>
177+
<CreateCoursePage
178+
courseOptions={courseOptions}
179+
courseRunOptions={courseRunOptions}
180+
fetchOrganizations={() => null}
181+
publisherUserInfo={{
182+
organizations,
183+
error: null,
184+
isFetching: false,
185+
}}
186+
courseInfo={{
187+
error: null,
188+
isCreating: false,
189+
data: {
190+
uuid: '11111111-1111-1111-1111-111111111111',
191+
},
192+
}}
193+
createCourse={() => null}
194+
/>
195+
</IntlProvider>
181196
</MemoryRouter>
182197
</Provider>,
183198
);
@@ -187,24 +202,26 @@ describe('CreateCoursePage', () => {
187202
const { container } = render(
188203
<Provider store={store}>
189204
<MemoryRouter>
190-
<CreateCoursePage
191-
courseOptions={courseOptions}
192-
courseRunOptions={courseRunOptions}
193-
fetchOrganizations={() => null}
194-
publisherUserInfo={{
195-
organizations,
196-
error: null,
197-
isFetching: false,
198-
}}
199-
courseInfo={{
200-
error: null,
201-
isCreating: true,
202-
data: {
203-
uuid: '11111111-1111-1111-1111-111111111111',
204-
},
205-
}}
206-
createCourse={() => null}
207-
/>
205+
<IntlProvider locale="en" messages={{}}>
206+
<CreateCoursePage
207+
courseOptions={courseOptions}
208+
courseRunOptions={courseRunOptions}
209+
fetchOrganizations={() => null}
210+
publisherUserInfo={{
211+
organizations,
212+
error: null,
213+
isFetching: false,
214+
}}
215+
courseInfo={{
216+
error: null,
217+
isCreating: true,
218+
data: {
219+
uuid: '11111111-1111-1111-1111-111111111111',
220+
},
221+
}}
222+
createCourse={() => null}
223+
/>
224+
</IntlProvider>
208225
</MemoryRouter>
209226
</Provider>,
210227
);

0 commit comments

Comments
 (0)