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

Switch from Bootstrap 3 to Bootstrap 4 #769

Merged
merged 64 commits into from
Jan 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
f8288a5
chore(bs4): upgrade to bootstrap 4 in package.json
LordSputnik Aug 27, 2021
e7c6112
fix(stylesheets): switch stylesheet from LESS to SCSS
LordSputnik Jan 22, 2022
d996742
fix(bs4): update style.scss to use new bootstrap 4 class structure
LordSputnik Jan 23, 2022
472691d
fix(bs4): replicate Bootstrap 3 style conventions with custom rules
LordSputnik Jan 23, 2022
873b056
chore(bs4): swap help-block to text-muted
LordSputnik Jan 2, 2022
5a72e4e
chore(bs4): migrate Alert component
LordSputnik Dec 23, 2021
93296ed
chore(bs4): preserve Badge appearance
LordSputnik Dec 23, 2021
cf1a509
chore(bs4): migrate Button component
LordSputnik Dec 23, 2021
8214e25
chore(bs4): migrate MenuItem component to Dropdown and NavDropdown
LordSputnik Dec 23, 2021
176475b
chore(bs4): swap Grid to Container
LordSputnik Dec 23, 2021
1176042
chore(bs4): update utility class names
LordSputnik Dec 23, 2021
5aa529d
chore(bs4): migrate to new grid breakpoints
LordSputnik Dec 24, 2021
7950968
chore(bs4): migrate Panel to Card
LordSputnik Dec 24, 2021
878fa51
chore(bs4): migrate Modal component
LordSputnik Dec 24, 2021
842490f
chore(bs4): migrate layout Navbar components
LordSputnik Dec 24, 2021
57d4f98
chore(bs4): use standard inline Form for Navbar search form
LordSputnik Dec 24, 2021
cc98479
chore(bs4): rewrite bs3 wells to use bs4 Card component
LordSputnik Dec 24, 2021
30518ca
chore(bs4): migrate ListGroupItem to ListGroup.Item
LordSputnik Dec 24, 2021
1bc1365
chore(bs4): align template to bootstrap4 starter template
LordSputnik Dec 26, 2021
54fd15f
chore(bs4): migrate OverlayTrigger component
LordSputnik Dec 26, 2021
e6b929d
chore(bs4): migrate Input to use updated Form and InputGroup components
LordSputnik Dec 26, 2021
e4964af
chore(bs4): drop removed dl-horizontal and restyle <dl>s
LordSputnik Dec 27, 2021
dc8c3c1
chore(bs4): migrate DateField input groups
LordSputnik Dec 27, 2021
26717cf
chore(bs4): migrate ControlLabel and HelpBlock in relationship editor
LordSputnik Dec 27, 2021
ef578b9
chore(bs4): migrate Checkbox to Form.Check
LordSputnik Dec 27, 2021
bf8ae5c
chore(bs4): rewrite Pager component to avoid react-bootstrap 0.x.x Pager
LordSputnik Jan 22, 2022
e7f4593
chore(bs4): rewrite editor-achievements.js to use standard components
LordSputnik Jan 2, 2022
949d711
chore(bs4): migrate Editor container Nav components
LordSputnik Jan 2, 2022
295dd0b
chore(bs4): additional visual improvements for Editor achievement page
LordSputnik Jan 2, 2022
6afe952
chore(bs4): correct collection table button formatting with ButtonGroup
LordSputnik Jan 2, 2022
8d7c13b
fix(bs4): specify secondary variant on Index buttons to fix color
LordSputnik Jan 2, 2022
d59d0fb
fix(bs4): restore gap between guess and copy sort name buttons
LordSputnik Jan 2, 2022
bcb740a
fix(bs4): apply secondary variant where dark buttons are required
LordSputnik Jan 2, 2022
6ee1653
chore(bs4): migrate SelectWrapper form components
LordSputnik Jan 2, 2022
82f5223
chore(bs4): migrate registration-details.js horizontal form
LordSputnik Jan 2, 2022
808af5b
fix(bs4): switch remaining 'bsStyle' to 'variant'
LordSputnik Jan 2, 2022
cc6402c
fix(bs4): align entity type selection dropdown on search page
LordSputnik Jan 2, 2022
734e76e
fix(bs4): re-apply styles to revision and statistics tables
LordSputnik Jan 2, 2022
01ea4bb
fix(bs4): swap input-group-btn to input-group-append on index search
LordSputnik Jan 2, 2022
8a6fba6
fix(bs4): add editor-info class to <dl> to retain label right alignment
LordSputnik Jan 2, 2022
40d6b44
fix(bs4): match old appearance of merge queue list and buttons
LordSputnik Jan 2, 2022
55b2a88
fix(bs4): match old button size on entity editor relationship section
LordSputnik Jan 3, 2022
44955ca
fix(bs4): switch FormGroup to Form.Group in relationship editor
LordSputnik Jan 3, 2022
d4e7539
fix(bs4): improve date field spacings
LordSputnik Jan 3, 2022
f25812c
fix(bs4): match old revision table appearance
LordSputnik Jan 3, 2022
b6ecda6
fix(bs4): make Select input with button fill up input-group
LordSputnik Jan 23, 2022
cd881dc
fix(bs4): switch back to current site primary button color
LordSputnik Jan 23, 2022
5169849
fix(bs4): shrink lead text on smaller devices
LordSputnik Jan 23, 2022
ce3caa4
fix(bs4): correct gap on RHS of navbar for all devices
LordSputnik Jan 23, 2022
1a3c31a
fix(bs4): restore BS3 padding on input group buttons
LordSputnik Jan 23, 2022
6b04757
fix(bs4): use text-light to set revision type badge text color
LordSputnik Jan 23, 2022
9b7baef
fix(bs4): add dependency on published lobes4 package
LordSputnik Jan 25, 2022
7ce91d2
Merge branch 'master' into pr/769
MonkeyDo Jan 27, 2022
5325406
chore: Update lockfile after merge
MonkeyDo Jan 27, 2022
9ca42a1
fix(bs4): Remove unwanted custom button margins
MonkeyDo Jan 27, 2022
a856160
chore: Remove duplicate log-node package requirement
MonkeyDo Jan 27, 2022
c857255
chore: Add execution permissions for build-scss script
MonkeyDo Jan 27, 2022
f43529f
fix(bs4): Fix collapsible annotation styles
MonkeyDo Jan 27, 2022
bdef3aa
fix(bs4): Vertical alignment of dropdown caret symbol
MonkeyDo Jan 27, 2022
9af2033
fix(bs4): Lighter color for striped tables
MonkeyDo Jan 27, 2022
a704df5
chore(bs4): reorganize scss and clean up useless classes
MonkeyDo Jan 27, 2022
133ca3e
fix(bs4): rebalance padding around achievement badges
LordSputnik Jan 28, 2022
4b7a0f3
fix(bs4): add right margin to navbar search to match bs3 look
LordSputnik Jan 28, 2022
9373aa0
chore(bs4): Remove dependency on git submodule "lobes"
MonkeyDo Jan 28, 2022
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
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[
"babel-plugin-transform-require-ignore",
{
"extensions": [".less", ".css"]
"extensions": [".scss", ".css"]
}
]
],
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ jobs:

- name: Checkout code
uses: actions/checkout@v2
with:
# Also check out Lobes bootstrap theme submodule
submodules: true

# Set up the test dabatase
- name: Set up test database in PostgreSQL
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/jsdoc-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
# Also check out Lobes bootstrap theme submodule
submodules: true

- name: NPM install
uses: bahmutov/npm-install@v1
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/lint-pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ jobs:
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
# Also check out Lobes bootstrap theme submodule
submodules: true

- name: NPM install
uses: bahmutov/npm-install@v1
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
# Also check out Lobes bootstrap theme submodule
submodules: true

- name: NPM install
uses: bahmutov/npm-install@v1
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"postinstall": "npm run prepublishOnly",
"build-server-js": "babel src --out-dir lib --ignore src/api --extensions .js,.jsx,.ts,.tsx",
"build-api-js": "babel src --out-dir lib --ignore 'src/server','src/client' --extensions .js,.jsx,.ts,.tsx",
"build-less": "./scripts/build-less.sh",
"build-scss": "./scripts/build-scss.sh",
"build": "npm run build-client && npm run build-server-js",
"build-client": "cross-env NODE_ENV=production webpack --progress --config webpack.client.js",
"prestart": "npm run build",
Expand Down Expand Up @@ -54,17 +54,17 @@
"influx": "^5.5.3",
"isomorphic-dompurify": "^0.13.0",
"jsesc": "^2.5.2",
"lobes4": "^4.0.0",
"lodash": "^4.17.21",
"log": "^6.0.0",
"log-node": "^8.0.2",
"log-node": "^8.0.3",
"morgan": "^1.10.0",
"nodemailer": "^6.5.0",
"passport": "^0.5.2",
"passport-musicbrainz-oauth2": "git+https://git@github.com/LordSputnik/passport-musicbrainz-oauth2.git",
"prop-types": "^15.7.2",
"react": "^16.13.1",
"react-bootstrap": "^0.33.1",
"react-bootstrap": "^1.6.4",
"react-chartjs-2": "^2.11.2",
"react-datepicker": "^2.16.0",
"react-dom": "^16.13.1",
Expand Down Expand Up @@ -105,7 +105,7 @@
"babel-loader": "^8.2.2",
"babel-plugin-lodash": "^3.3.4",
"babel-plugin-transform-require-ignore": "^0.1.1",
"bootstrap": "^3.4.1",
"bootstrap": "^4.6.1",
"chai": "^4.0.2",
"chai-arrays": "^2.2.0",
"chai-as-promised": "^7.0.0",
Expand All @@ -122,12 +122,13 @@
"eslint-webpack-plugin": "^2.4.1",
"faker": "^4.1.0",
"file-loader": "^6.2.0",
"less": "^4.1.1",
"less-loader": "^10.0.1",
"mini-css-extract-plugin": "^2.5.3",
"mocha": "^9.1.3",
"nodemon": "^2.0.2",
"resolve-url-loader": "^5.0.0",
"rewire": "^5.0.0",
"sass": "^1.49.0",
"sass-loader": "^12.4.0",
"typescript": "^4.0.5",
"uuid": "^8.3.2",
"webpack": "^5.64.4",
Expand Down
16 changes: 0 additions & 16 deletions scripts/build-less.sh

This file was deleted.

11 changes: 11 additions & 0 deletions scripts/build-scss.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash


# specify paths for production
if [ "$DEPLOY_ENV" == "prod" ] || [ "$DEPLOY_ENV" == "test" ]; then
node /home/bookbrainz/bookbrainz-site/node_modules/.bin/sass -I /home/bookbrainz/bookbrainz-site/node_modules ./src/client/stylesheets/style.scss > /home/bookbrainz/bookbrainz-site/static/stylesheets/style.css
exit 0
fi

mkdir -p static/stylesheets
sass -I node_modules src/client/stylesheets/style.scss > static/stylesheets/style.css
6 changes: 3 additions & 3 deletions src/client/components/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ import PropTypes from 'prop-types';
import React from 'react';


const {Col, Grid, Row} = bootstrap;
const {Col, Container, Row} = bootstrap;

function Footer(props) {
const {repositoryUrl, siteRevision} = props;

return (
<footer className="footer">
<Grid fluid>
<Container fluid>
<Row>
<Col xs={4}>
<small>{'Tested with '}
Expand Down Expand Up @@ -77,7 +77,7 @@ function Footer(props) {
</a>
</small>
</div>
</Grid>
</Container>
</footer>
);
}
Expand Down
39 changes: 18 additions & 21 deletions src/client/components/forms/deletion.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {kebabCase as _kebabCase} from 'lodash';
import request from 'superagent';


const {Alert, Button, Col, Row, Panel} = bootstrap;
const {Alert, Button, Col, Row, Card} = bootstrap;

class EntityDeletionForm extends React.Component {
constructor(props) {
Expand Down Expand Up @@ -89,7 +89,7 @@ class EntityDeletionForm extends React.Component {
let errorComponent = null;
if (this.state.error) {
errorComponent =
<Alert bsStyle="danger">{this.state.error}</Alert>;
<Alert variant="danger">{this.state.error}</Alert>;
}

const loadingComponent = this.state.waiting ? <LoadingSpinner/> : null;
Expand All @@ -98,16 +98,17 @@ class EntityDeletionForm extends React.Component {
const footerComponent = (
<span className="clearfix">
<Button
bsStyle="danger"
className="pull-right"
className="float-right"
disabled={!hasNote}
type="submit"
variant="danger"
>
<FontAwesomeIcon icon={faTrashAlt}/> Delete
</Button>
<Button
className="pull-right"
className="float-right"
href={this.entityUrl}
variant="secondary"
>
<FontAwesomeIcon icon={faTimesCircle}/> Cancel
</Button>
Expand All @@ -128,19 +129,15 @@ class EntityDeletionForm extends React.Component {
<h1>Delete Entity</h1>
<Row className="margin-top-2">
{loadingComponent}
<Col md={6} mdOffset={3}>
<Col lg={{offset: 3, span: 6}}>
<form onSubmit={this.handleSubmit}>
<Panel
bsStyle="danger"
>
<Panel.Heading>
<Panel.Title componentClass="h3">
Confirm Deletion
</Panel.Title>
</Panel.Heading>
<Panel.Body>

<Alert bsStyle="warning">
<Card bg="danger">
<Card.Header as="h4">
Confirm Deletion
</Card.Header>
<Card.Body>

<Alert variant="warning">
<h4>
<FontAwesomeIcon icon={faExclamationTriangle}/>&nbsp;
You’re about to delete the {entity.type} {entityName}.
Expand Down Expand Up @@ -188,11 +185,11 @@ class EntityDeletionForm extends React.Component {
onChange={this.handleNoteChange}
/>
{errorComponent}
</Panel.Body>
<Panel.Footer>
</Card.Body>
<Card.Footer>
{footerComponent}
</Panel.Footer>
</Panel>
</Card.Footer>
</Card>
</form>
</Col>
</Row>
Expand Down
28 changes: 16 additions & 12 deletions src/client/components/forms/parts/achievement.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import PropTypes from 'prop-types';
import React from 'react';


const {Col} = bootstrap;
const {Card, Col, Container, Row} = bootstrap;

class Achievement extends React.Component {
constructor(props) {
Expand Down Expand Up @@ -57,17 +57,21 @@ class Achievement extends React.Component {
);
}
return (
<div className="row well">
<Col sm={2}>
{imgElement}
</Col>
<Col sm={8}>
<div className="h2">
{this.state.achievement.name}
</div>
<p>{this.state.achievement.description}</p>
</Col>
</div>
<Card bg="light">
<Container fluid>
<Row>
<Col md={2}>
{imgElement}
</Col>
<Col md={8}>
<div className="h2">
{this.state.achievement.name}
</div>
<p>{this.state.achievement.description}</p>
</Col>
</Row>
</Container>
</Card>
);
}
}
Expand Down
28 changes: 13 additions & 15 deletions src/client/components/forms/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import SelectWrapper from '../input/select-wrapper';
import ValidationLabel from '../../entity-editor/common/validation-label';


const {Alert, Button, Col, Panel, Row} = bootstrap;
const {Alert, Button, Col, Card, Row} = bootstrap;
const {injectDefaultAliasName} = utilsHelper;

class ProfileForm extends React.Component {
Expand Down Expand Up @@ -140,7 +140,7 @@ class ProfileForm extends React.Component {
let errorComponent = null;
if (this.state.error) {
errorComponent =
<Alert bsStyle="danger">{this.state.error.message}</Alert>;
<Alert variant="danger">{this.state.error.message}</Alert>;
}

const hasChanged = this.hasChanged();
Expand All @@ -155,15 +155,13 @@ class ProfileForm extends React.Component {
<div>
<Row className="margin-top-2">
{loadingElement}
<Col md={8} mdOffset={2}>
<Col lg={{offset: 2, span: 8}}>
<form onSubmit={this.handleSubmit}>
<Panel>
<Panel.Heading>
<Panel.Title>
<span className="h3">Edit your public profile</span>
</Panel.Title>
</Panel.Heading>
<Panel.Body>
<Card>
<Card.Header as="h3">
Edit your public profile
</Card.Header>
<Card.Body>
<CustomInput
defaultValue={name}
help="required"
Expand Down Expand Up @@ -213,17 +211,17 @@ class ProfileForm extends React.Component {
onChange={this.handleSelectChange}
/>
{errorComponent}
</Panel.Body>
<Panel.Footer>
</Card.Body>
<Card.Footer>
<Button
bsStyle="success"
disabled={!hasChanged}
type="submit"
variant="success"
>
Save changes
</Button>
</Panel.Footer>
</Panel>
</Card.Footer>
</Card>
</form>
</Col>
</Row>
Expand Down
Loading