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

Fix for #1770 with Tailwind #2475

Open
wants to merge 4 commits into
base: tailwindcss
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"node": ">=20.0.0 <21.0.0"
},
"scripts": {
"build": "yarn run nearley && yarn run sass && tsc -b && yarn run webpack && && npx tailwindcss -i ./src/css/stylesheet.css -o ./public/css/stylesheet.css",
"build": "yarn run nearley && yarn run sass && tsc -b && yarn run webpack && npx tailwindcss -i ./src/css/stylesheet.css -o ./public/css/stylesheet.css",
"lint": "yarn run prettier-base --check && yarn run eslint --max-warnings 0",
"bash": "bash",
"beautify": "yarn run prettier",
Expand All @@ -25,7 +25,7 @@
"test:watch": "yarn run webpack --watch & yarn run test-loud --watch --verbose false",
"nearley": "sh nearley/helper.sh",
"ci-build": "yarn run nearley && yarn run sass && tsc -b && NODE_OPTIONS=--max_old_space_size=16384 node_modules/.bin/webpack --mode production --config webpack.prod.mjs",
"devstart": "yarn run nearley && yarn run sass --watch & yarn run nodemon & yarn run webpack-dev-server & yarn run webpack --watch & npx tailwindcss -i ./src/css/stylesheet.css -o ./public/css/stylesheet.css --watch",
"devstart": "yarn run nearley && yarn run sass --watch & yarn run nodemon & yarn run webpack-dev-server & yarn run tailwind:watch & yarn run webpack --watch & npx tailwindcss -i ./src/css/stylesheet.css -o ./public/css/stylesheet.css --watch=always",
"setup": "yarn run nearley && yarn run webpack --progress && node --max-old-space-size=8192 force_update.js",
"cards": "node --max-old-space-size=8192 force_update.js",
"download-model": "node --max-old-space-size=8192 jobs/download_model.js",
Expand Down
1 change: 1 addition & 0 deletions public/css/stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,7 @@ video {
--card-multi: 92 88 9;
--card-colorless: 60 58 64;
--card-lands: 95 58 36;
color-scheme: dark;
}

.container {
Expand Down
3 changes: 2 additions & 1 deletion src/components/CubeCompareNavbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
import React, { Component } from 'react';
import { Collapse, Nav, Navbar, NavbarToggler, NavItem, NavLink } from 'reactstrap';

import Text from 'components/base/Text';
import FilterCollapse from 'components/FilterCollapse';
import SortCollapse from 'components/SortCollapse';
import TagColorsModal from 'components/modals/TagColorsModal';
import SortCollapse from 'components/SortCollapse';

class CubeCompareNavbar extends Component {
constructor(props) {
Expand Down
2 changes: 2 additions & 0 deletions src/components/CubeDraftError.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { Card, CardBody, CardHeader } from 'reactstrap';

import PropTypes from 'prop-types';

import Text from 'components/base/Text';

const CubeDraftError = ({ message }) => {
return (
<Card className="mt-4">
Expand Down
1 change: 1 addition & 0 deletions src/components/CubeDraftStaging.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { LockIcon, PasteIcon } from '@primer/octicons-react';
import PropTypes from 'prop-types';
import DraftPropType from 'proptypes/DraftPropType';

import Text from 'components/base/Text';
import Username from 'components/Username';
import DomainContext from 'contexts/DomainContext';
import UserContext from 'contexts/UserContext';
Expand Down
1 change: 1 addition & 0 deletions src/components/CubeHistory.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Card, CardBody, CardHeader, Col, Row, Spinner } from 'reactstrap';
import PropTypes from 'prop-types';
import InfiniteScroll from 'react-infinite-scroll-component';

import Text from 'components/base/Text';
import BlogPostChangelog from 'components/blog/BlogPostChangelog';
import CubeContext from 'contexts/CubeContext';
import { csrfFetch } from 'utils/CSRF';
Expand Down
2 changes: 2 additions & 0 deletions src/components/CubeIdModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { Button, Input, InputGroup, Label, Modal, ModalBody, ModalFooter, ModalH
import { PasteIcon } from '@primer/octicons-react';
import PropTypes from 'prop-types';

import Text from 'components/base/Text';

const CubeIdModal = ({ toggle, isOpen, shortId, fullID, alert }) => {
const onCopyClick = async (id, label) => {
await navigator.clipboard.writeText(id);
Expand Down
1 change: 1 addition & 0 deletions src/components/CurveView.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Card, CardBody, CardHeader, Col, Row } from 'reactstrap';

import PropTypes from 'prop-types';

import Text from 'components/base/Text';
import AutocardListGroup from 'components/card/AutocardListGroup';
import CubeContext from 'contexts/CubeContext';
import { getLabels, sortDeep } from 'utils/Sort';
Expand Down
1 change: 1 addition & 0 deletions src/components/DeckCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import PropTypes from 'prop-types';
import DeckPropType from 'proptypes/DeckPropType';
import DeckSeatPropType from 'proptypes/DeckSeatPropType';

import Text from 'components/base/Text';
import CardGrid from 'components/card/CardGrid';
import CardImage from 'components/card/CardImage';
import CommentsSection from 'components/comments/CommentsSection';
Expand Down
1 change: 1 addition & 0 deletions src/components/DeckStacks.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { CardBody, CardHeader, CardTitle, Row } from 'reactstrap';
import PropTypes from 'prop-types';
import CardPropType from 'proptypes/CardPropType';

import Text from 'components/base/Text';
import CardStack from 'components/card/CardStack';
import DraggableCard from 'components/DraggableCard';
import Location from 'drafting/DraftLocation';
Expand Down
1 change: 1 addition & 0 deletions src/components/DecksPickBreakdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Col, ListGroup, ListGroupItem, Row } from 'reactstrap';
import PropTypes from 'prop-types';
import DraftPropType from 'proptypes/DraftPropType';

import Text from 'components/base/Text';
import FoilCardImage from 'components/FoilCardImage';
import withAutocard from 'components/WithAutocard';
import { getDrafterState } from 'drafting/draftutil';
Expand Down
1 change: 1 addition & 0 deletions src/components/Pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Card, CardBody, CardHeader, CardTitle, Col, Row, Spinner } from 'reacts
import PropTypes from 'prop-types';
import CardPropType from 'proptypes/CardPropType';

import Text from 'components/base/Text';
import DraggableCard from 'components/DraggableCard';
import FoilCardImage from 'components/FoilCardImage';
import DraftLocation from 'drafting/DraftLocation';
Expand Down
1 change: 1 addition & 0 deletions src/components/SortCollapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Button, Col, Collapse, Input, Row } from 'reactstrap';

import PropTypes from 'prop-types';

import Text from 'components/base/Text';
import Tooltip from 'components/base/Tooltip';
import CubeContext from 'contexts/CubeContext';
import { ORDERED_SORTS, SORTS } from 'utils/Sort';
Expand Down
1 change: 1 addition & 0 deletions src/components/TableView.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Col, Row } from 'reactstrap';
import PropTypes from 'prop-types';
import CardPropType from 'proptypes/CardPropType';

import Text from 'components/base/Text';
import AutocardListGroup from 'components/card/AutocardListGroup';
import CubeContext from 'contexts/CubeContext';
import DisplayContext from 'contexts/DisplayContext';
Expand Down
1 change: 1 addition & 0 deletions src/components/UserPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Card } from 'reactstrap';
import PropTypes from 'prop-types';

import AspectRatioBox from 'components/base/AspectRatioBox';
import Text from 'components/base/Text';
import MtgImage from 'components/MtgImage';
import Username from 'components/Username';

Expand Down
1 change: 1 addition & 0 deletions src/components/content/Podcast.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import PropTypes from 'prop-types';
import ContentPropType from 'proptypes/ContentPropType';

import AspectRatioBox from 'components/base/AspectRatioBox';
import Text from 'components/base/Text';
import CommentsSection from 'components/comments/CommentsSection';
import PodcastEpisodePreview from 'components/content/PodcastEpisodePreview';
import Username from 'components/Username';
Expand Down
1 change: 1 addition & 0 deletions src/components/content/Video.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import ContentPropType from 'proptypes/ContentPropType';
import ReactPlayer from 'react-player';
import TimeAgo from 'react-timeago';

import Text from 'components/base/Text';
import CommentsSection from 'components/comments/CommentsSection';
import Markdown from 'components/Markdown';
import Username from 'components/Username';
Expand Down
2 changes: 2 additions & 0 deletions src/components/nav/Notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import React from 'react';
import PropTypes from 'prop-types';
import TimeAgo from 'react-timeago';

import Text from 'components/base/Text';

const Notification = ({ notification }) => {
const texts = notification.body.split(notification.fromUsername);
return (
Expand Down
1 change: 1 addition & 0 deletions src/css/stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
--card-multi: 92 88 9;
--card-colorless: 60 58 64;
--card-lands: 95 58 36;
color-scheme: dark;
}
}

Expand Down
1 change: 1 addition & 0 deletions src/pages/BulkUploadPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Card, CardBody, CardHeader, Col, Label, Row, UncontrolledAlert } from '
import PropTypes from 'prop-types';

import AutocompleteInput from 'components/base/AutocompleteInput';
import Text from 'components/base/Text';
import Changelist from 'components/Changelist';
import DynamicFlash from 'components/DynamicFlash';
import { getCard } from 'components/EditCollapse';
Expand Down
3 changes: 2 additions & 1 deletion src/pages/CubeDecksPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import PropTypes from 'prop-types';
import CubePropType from 'proptypes/CubePropType';
import DeckPropType from 'proptypes/DeckPropType';

import Paginate from 'components/base/Pagination';
import Text from 'components/base/Text';
import DeckPreview from 'components/DeckPreview';
import DynamicFlash from 'components/DynamicFlash';
import Paginate from 'components/base/Pagination';
import RenderToRoot from 'components/RenderToRoot';
import CubeLayout from 'layouts/CubeLayout';
import MainLayout from 'layouts/MainLayout';
Expand Down
1 change: 1 addition & 0 deletions src/pages/CubeListPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React, { useContext } from 'react';
import PropTypes from 'prop-types';
import CubePropType from 'proptypes/CubePropType';

import Text from 'components/base/Text';
import CubeListNavbar from 'components/CubeListNavbar';
import CurveView from 'components/CurveView';
import DynamicFlash from 'components/DynamicFlash';
Expand Down
1 change: 1 addition & 0 deletions src/pages/GridDraftPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import CardPropType from 'proptypes/CardPropType';
import CubePropType from 'proptypes/CubePropType';
import DraftPropType from 'proptypes/DraftPropType';

import Text from 'components/base/Text';
import CSRFForm from 'components/CSRFForm';
import CustomImageToggler from 'components/CustomImageToggler';
import DeckStacks from 'components/DeckStacks';
Expand Down
1 change: 1 addition & 0 deletions src/pages/InfoPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Card, CardBody, CardHeader, Col, Row, Table } from 'reactstrap';
import PropTypes from 'prop-types';

import Banner from 'components/Banner';
import Text from 'components/base/Text';
import DynamicFlash from 'components/DynamicFlash';
import RenderToRoot from 'components/RenderToRoot';
import MainLayout from 'layouts/MainLayout';
Expand Down
1 change: 1 addition & 0 deletions src/pages/LoginPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Button, Card, CardBody, CardHeader, Col, FormGroup, Input, Label, Row }
import PropTypes from 'prop-types';

import Banner from 'components/Banner';
import Text from 'components/base/Text';
import CSRFForm from 'components/CSRFForm';
import DynamicFlash from 'components/DynamicFlash';
import RenderToRoot from 'components/RenderToRoot';
Expand Down
1 change: 1 addition & 0 deletions src/pages/LostPasswordPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Button, Card, CardBody, CardHeader, Col, FormGroup, Input, Label, Row }
import PropTypes from 'prop-types';

import Banner from 'components/Banner';
import Text from 'components/base/Text';
import CSRFForm from 'components/CSRFForm';
import DynamicFlash from 'components/DynamicFlash';
import RenderToRoot from 'components/RenderToRoot';
Expand Down
1 change: 1 addition & 0 deletions src/pages/MarkdownPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Card, CardBody, CardHeader, Col, Row } from 'reactstrap';
import PropTypes from 'prop-types';

import Banner from 'components/Banner';
import Text from 'components/base/Text';
import DynamicFlash from 'components/DynamicFlash';
import Markdown from 'components/Markdown';
import RenderToRoot from 'components/RenderToRoot';
Expand Down
1 change: 1 addition & 0 deletions src/pages/NotificationsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import PropTypes from 'prop-types';
import InfiniteScroll from 'react-infinite-scroll-component';

import Banner from 'components/Banner';
import Text from 'components/base/Text';
import DynamicFlash from 'components/DynamicFlash';
import Notification from 'components/nav/Notification';
import RenderToRoot from 'components/RenderToRoot';
Expand Down
1 change: 1 addition & 0 deletions src/pages/PasswordResetPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Button, Card, CardBody, CardHeader, Col, FormGroup, Input, Label, Row }
import PropTypes from 'prop-types';

import Banner from 'components/Banner';
import Text from 'components/base/Text';
import CSRFForm from 'components/CSRFForm';
import DynamicFlash from 'components/DynamicFlash';
import RenderToRoot from 'components/RenderToRoot';
Expand Down
1 change: 1 addition & 0 deletions src/pages/PodcastEpisodePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import ReactAudioPlayer from 'react-audio-player';
import TimeAgo from 'react-timeago';

import AspectRatioBox from 'components/base/AspectRatioBox';
import Text from 'components/base/Text';
import CommentsSection from 'components/comments/CommentsSection';
import DynamicFlash from 'components/DynamicFlash';
import RenderToRoot from 'components/RenderToRoot';
Expand Down
3 changes: 2 additions & 1 deletion src/pages/PodcastsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import PropTypes from 'prop-types';
import InfiniteScroll from 'react-infinite-scroll-component';

import Banner from 'components/Banner';
import DynamicFlash from 'components/DynamicFlash';
import Text from 'components/base/Text';
import PodcastEpisodePreview from 'components/content/PodcastEpisodePreview';
import PodcastPreview from 'components/content/PodcastPreview';
import DynamicFlash from 'components/DynamicFlash';
import RenderToRoot from 'components/RenderToRoot';
import MainLayout from 'layouts/MainLayout';
import { csrfFetch } from 'utils/CSRF';
Expand Down
1 change: 1 addition & 0 deletions src/pages/RecentDraftsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import DeckPropType from 'proptypes/DeckPropType';
import InfiniteScroll from 'react-infinite-scroll-component';

import Banner from 'components/Banner';
import Text from 'components/base/Text';
import DeckPreview from 'components/DeckPreview';
import DynamicFlash from 'components/DynamicFlash';
import RenderToRoot from 'components/RenderToRoot';
Expand Down
1 change: 1 addition & 0 deletions src/pages/RegisterPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Button, Card, CardBody, CardHeader, Col, FormGroup, Input, Label, Row }
import PropTypes from 'prop-types';

import Banner from 'components/Banner';
import Text from 'components/base/Text';
import CSRFForm from 'components/CSRFForm';
import DynamicFlash from 'components/DynamicFlash';
import RenderToRoot from 'components/RenderToRoot';
Expand Down
1 change: 1 addition & 0 deletions src/pages/SearchPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import PropTypes from 'prop-types';
import CubePropType from 'proptypes/CubePropType';
import InfiniteScroll from 'react-infinite-scroll-component';

import Text from 'components/base/Text';
import CubePreview from 'components/CubePreview';
import CubeSearchNavBar from 'components/CubeSearchNavBar';
import DynamicFlash from 'components/DynamicFlash';
Expand Down
3 changes: 2 additions & 1 deletion src/pages/UserDecksPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import PropTypes from 'prop-types';
import DeckPropType from 'proptypes/DeckPropType';

import Banner from 'components/Banner';
import Paginate from 'components/base/Pagination';
import Text from 'components/base/Text';
import DeckPreview from 'components/DeckPreview';
import DynamicFlash from 'components/DynamicFlash';
import Paginate from 'components/base/Pagination';
import RenderToRoot from 'components/RenderToRoot';
import MainLayout from 'layouts/MainLayout';
import UserLayout from 'layouts/UserLayout';
Expand Down
1 change: 1 addition & 0 deletions src/pages/UserSocialPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import PropTypes from 'prop-types';
import CubePropType from 'proptypes/CubePropType';

import Banner from 'components/Banner';
import Text from 'components/base/Text';
import CubePreview from 'components/CubePreview';
import DynamicFlash from 'components/DynamicFlash';
import RenderToRoot from 'components/RenderToRoot';
Expand Down
1 change: 1 addition & 0 deletions src/pages/VersionPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Card, CardBody, CardHeader } from 'reactstrap';

import PropTypes from 'prop-types';

import Text from 'components/base/Text';
import RenderToRoot from 'components/RenderToRoot';
import MainLayout from 'layouts/MainLayout';

Expand Down
3 changes: 2 additions & 1 deletion src/pages/VideosPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import PropTypes from 'prop-types';
import InfiniteScroll from 'react-infinite-scroll-component';

import Banner from 'components/Banner';
import Text from 'components/base/Text';
import VideoPreview from 'components/content/VideoPreview';
import DynamicFlash from 'components/DynamicFlash';
import RenderToRoot from 'components/RenderToRoot';
import VideoPreview from 'components/content/VideoPreview';
import MainLayout from 'layouts/MainLayout';
import { csrfFetch } from 'utils/CSRF';
import { wait } from 'utils/Util';
Expand Down