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

Updating Tailwind to V3 #4196

Merged
merged 22 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
365c020
Updating dependencies to tailwind v3.3, updating configurations with …
justinconabree Mar 29, 2023
4c0b681
Changing tokens to use tailwind config, refactor for border radius to…
justinconabree Mar 29, 2023
c0cfa92
Fixing self reference in config, fixing broken index.module.css, fixi…
justinconabree Mar 29, 2023
301b226
WIP going through tailwind TODOs and changing to tailwind values, fix…
justinconabree Mar 30, 2023
46cb4dc
Fixing priority issues, adding new theme values, fixing theme and tokens
justinconabree Apr 11, 2023
793fdcf
Changing all media queries to use config screen sizes, adding new scr…
justinconabree Jun 8, 2023
c976657
Fixing lint and prettier
justinconabree Jun 8, 2023
ee54e29
Merge remote-tracking branch 'origin/develop' into jconabree/tailwind…
justinconabree Jun 8, 2023
7e7363b
Fixing tailwind review comments, updating tailwind doc
justinconabree Jun 8, 2023
832c75e
fix prettier
justinconabree Jun 8, 2023
985e94a
Removing checkmo from tests
justinconabree Jun 8, 2023
5dac7c0
fix jest test for accout menu
justinconabree Jun 8, 2023
3dccb14
fixing visibility priority issues
justinconabree Jun 8, 2023
9709b1d
Merge branch 'develop' into jconabree/tailwind-v3-update
glo42707 Aug 10, 2023
288028b
Merge branch 'develop' into jconabree/tailwind-v3-update
glo82145 Oct 4, 2023
a7b7178
PWA-3174::[feature]: Tailwind v3 support
glo82145 Oct 4, 2023
6c22c11
Merge branch 'develop' into jconabree/tailwind-v3-update
glo82145 Oct 4, 2023
332b5c9
Merge branch 'develop' into jconabree/tailwind-v3-update
glo82145 Oct 4, 2023
303f641
Merge branch 'develop' into jconabree/tailwind-v3-update
glo42707 Oct 19, 2023
8211c1e
Merge branch 'develop' into jconabree/tailwind-v3-update
justinconabree Nov 9, 2023
b32cfd1
Merge branch 'develop' into jconabree/tailwind-v3-update
glo82145 Dec 26, 2023
812943a
Resolved conflicts
glo82145 Mar 21, 2024
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
42,112 changes: 42,112 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
"watch:venia": "yarn venia run watch"
},
"dependencies": {
"@material-ui/core": "~4.12.4",
"caniuse-lite": "~1.0.30001335"
},
"devDependencies": {
Expand Down Expand Up @@ -88,7 +87,7 @@
"lodash.debounce": "~4.0.8",
"prettier": "~1.16.4",
"rimraf": "~2.6.3",
"tailwindcss": "~2.2.7"
"tailwindcss": "~3.3.0"
},
"optionalDependencies": {
"bundlesize": "~0.18.1",
Expand Down Expand Up @@ -116,4 +115,4 @@
"maxSize": "100 kB"
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ Array [
},
"productType": "ConfigurableProduct",
"sku": "VSK02",
"topLevelSku": "VSK02",
},
"quantity": 1,
},
Expand Down Expand Up @@ -83,7 +82,6 @@ Array [
},
"productType": "SimpleProduct",
"sku": "VA17-SI-NA",
"topLevelSku": "VA17-SI-NA",
},
"quantity": 2,
},
Expand Down Expand Up @@ -132,7 +130,6 @@ Array [
},
"productType": "ConfigurableProduct",
"sku": "VA04",
"topLevelSku": "VA04",
},
"quantity": 3,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ Object {
},
"productType": "ConfigurableProduct",
"sku": "VSK02",
"topLevelSku": "VSK02",
},
"quantity": 1,
},
Expand Down Expand Up @@ -79,7 +78,6 @@ Object {
},
"productType": "SimpleProduct",
"sku": "VA17-SI-NA",
"topLevelSku": "VA17-SI-NA",
},
"quantity": 2,
},
Expand Down Expand Up @@ -124,7 +122,6 @@ Object {
},
"productType": "ConfigurableProduct",
"sku": "VA04",
"topLevelSku": "VA04",
},
"quantity": 3,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ describe('handle()', () => {
},
"productType": "ConfigurableProduct",
"sku": "VSK02",
"topLevelSku": "VSK02",
},
"quantity": 1,
},
Expand Down Expand Up @@ -117,7 +116,6 @@ describe('handle()', () => {
},
"productType": "SimpleProduct",
"sku": "VA17-SI-NA",
"topLevelSku": "VA17-SI-NA",
},
"quantity": 2,
},
Expand Down Expand Up @@ -166,7 +164,6 @@ describe('handle()', () => {
},
"productType": "ConfigurableProduct",
"sku": "VA04",
"topLevelSku": "VA04",
},
"quantity": 3,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ describe('handle()', () => {
},
"productType": "ConfigurableProduct",
"sku": "VP08",
"topLevelSku": "VP08",
},
"quantity": 3,
},
Expand Down Expand Up @@ -139,7 +138,6 @@ describe('handle()', () => {
},
"productType": "ConfigurableProduct",
"sku": "VA09",
"topLevelSku": "VA09",
},
"quantity": 1,
},
Expand Down Expand Up @@ -175,7 +173,6 @@ describe('handle()', () => {
},
"productType": "SimpleProduct",
"sku": "VA22-SI-NA",
"topLevelSku": "VA22-SI-NA",
},
"quantity": 1,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export const getFormattedProducts = products => {
product: {
name: name,
sku: sku,
topLevelSku: product.sku,
productType: type,
pricing: {
regularPrice: prices.price.value,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
.payment_type {
}

@media (max-width: 960px) {
@media screen(-lg) {
.edit_text {
display: none;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@media only screen and (max-width: 768px) {
.root {
background-attachment: scroll !important;
flex-basis: 100%;
@apply !bg-scroll;
@apply basis-full;
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.root:empty {
display: none;
.root {
composes: empty_hidden from global;
}

.root_inline {
composes: root;
display: inline-block;
@apply inline-block;
}
5 changes: 1 addition & 4 deletions packages/pagebuilder/lib/ContentTypes/Tabs/tabs.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -125,16 +125,13 @@ ul.navigation::-webkit-scrollbar {

.panel {
min-height: inherit;
composes: !empty_hidden from global;
}

.panelSelected {
display: block;
}

.panel:empty {
display: none !important; /* Necessary because of inline styles; to be fixed in MC-18326 */
}

.content {
border: var(--tabs-border-width) var(--tabs-border) var(--tabs-border-color);
overflow: hidden;
Expand Down
4 changes: 2 additions & 2 deletions packages/peregrine/lib/hooks/useDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const useDropdown = () => {
const triggerRef = useRef(null);
const [expanded, setExpanded] = useState(false);

// collapse on mousedown or tab outside of the element and trigger.
// collapse on mousedown outside of the element and trigger.
const maybeCollapse = useCallback(({ target }) => {
const isOutsideElement =
!elementRef.current || !elementRef.current.contains(target);
Expand All @@ -27,7 +27,7 @@ export const useDropdown = () => {
}, []);

// add listener to document, as an effect
useEventListener(globalThis.document, 'click', maybeCollapse);
useEventListener(globalThis.document, 'mousedown', maybeCollapse);

/**
* The object returned contains the pieces needed to add the dropdown logic to your components
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ import { useFilterBlock } from '../useFilterBlock';

const log = jest.fn();

jest.mock('react-router-dom', () => ({
useLocation: jest.fn(() => ({ search: '?a=b&c=d' }))
}));

let handleClickProp = null;
let inputValues = {};

Expand Down
11 changes: 2 additions & 9 deletions packages/peregrine/lib/talons/FilterModal/useFilterBlock.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
import { useCallback, useState, useEffect, useMemo } from 'react';
import { useLocation } from 'react-router-dom';

export const useFilterBlock = props => {
const { filterState, items, initialOpen, group } = props;
const location = useLocation();
const { filterState, items, initialOpen } = props;

const hasSelected = useMemo(() => {
const params = new URLSearchParams(location.search);
//expansion of price filter dropdown
if (group == 'price') {
return params.get('price[filter]') ? true : false;
}
return items.some(item => {
return filterState && filterState.has(item);
});
}, [filterState, items, group, location.search]);
}, [filterState, items]);

const [isExpanded, setExpanded] = useState(hasSelected || initialOpen);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ jest.mock('react-router-dom', () => ({
useHistory: jest.fn(() => ({ push: jest.fn() })),
useLocation: jest.fn(() => ({ pathname: '', search: '' }))
}));

const mockPush = jest.fn();
useHistory.mockImplementation(() => ({ push: mockPush }));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,9 @@ export const useFilterSidebar = props => {
}, [handleClose]);

const handleReset = useCallback(() => {
// filterApi.clear();
// setIsApplying(true);
history.replace({ search: 'page=1' });
}, [history]);
filterApi.clear();
setIsApplying(true);
}, [filterApi, setIsApplying]);

const handleKeyDownActions = useCallback(
event => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export const RESOLVE_URL = gql`
# eslint-disable-next-line @graphql-eslint/require-id-when-available
... on ProductInterface {
uid
sku
__typename
}
# eslint-disable-next-line @graphql-eslint/require-id-when-available
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Object {
"availableSortMethods": null,
"categoryDescription": "Jewelry category",
"categoryName": "Jewelry",
"filterOptions": undefined,
"filters": null,
"items": Array [
null,
Expand All @@ -18,7 +17,6 @@ Object {
null,
null,
],
"setFilterOptions": [Function],
"totalCount": null,
"totalPagesFromData": null,
}
Expand All @@ -34,7 +32,6 @@ Object {
],
"categoryDescription": "Jewelry category",
"categoryName": "Jewelry",
"filterOptions": undefined,
"filters": Array [
Object {
"label": "Label",
Expand All @@ -50,7 +47,6 @@ Object {
"name": "Necklace",
},
],
"setFilterOptions": [Function],
"totalCount": 2,
"totalPagesFromData": 1,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,6 @@ jest.mock('@apollo/client', () => {
};
});

const mockGetFiltersAttributeCode = {
data: {
products: {
aggregations: [
{
label: 'Label'
}
]
}
}
};

const mockProductFiltersByCategoryData = {
data: {
products: {
Expand Down Expand Up @@ -103,22 +91,21 @@ const mockCategoryData = {

const mockGetSortMethods = jest.fn();
const mockGetFilters = jest.fn();
const mockfilterData = jest.fn();

jest.mock('@magento/peregrine/lib/context/eventing', () => ({
useEventingContext: jest.fn().mockReturnValue([{}, { dispatch: jest.fn() }])
}));

const Component = props => {
const talonprops = useCategoryContent(props);

return <i {...talonprops} />;
};

useQuery.mockReturnValue({ data: mockCategoryData });
describe('useCategoryContent tests', () => {
it('returns the proper shape', () => {
useLazyQuery
.mockReturnValueOnce([mockfilterData, mockGetFiltersAttributeCode])
.mockReturnValueOnce([
mockGetFilters,
mockProductFiltersByCategoryData
Expand All @@ -137,7 +124,6 @@ describe('useCategoryContent tests', () => {

it('handles default category id', () => {
useLazyQuery
.mockReturnValueOnce([mockfilterData, mockGetFiltersAttributeCode])
.mockReturnValueOnce([
mockGetFilters,
mockProductFiltersByCategoryData
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { gql } from '@apollo/client';

const GET_PRODUCT_FILTERS_BY_CATEGORY = gql`
export const GET_PRODUCT_FILTERS_BY_CATEGORY = gql`
query getProductFiltersByCategory(
$categoryIdFilter: FilterEqualTypeInput!
) {
Expand All @@ -11,8 +11,9 @@ const GET_PRODUCT_FILTERS_BY_CATEGORY = gql`
attribute_code
options {
label
count
value
}
position
}
}
}
Expand Down
Loading