GithubHelp home page GithubHelp logo

tankonstin-labs / taburette Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.91 MB

Tab showcase web application

License: MIT License

Shell 0.02% Python 45.36% Mako 0.29% HTML 0.92% JavaScript 52.97% CSS 0.44%
alembic alphatab flask javascript postgresql python react

taburette's People

Contributors

kostmetallist avatar

Stargazers

 avatar

taburette's Issues

Restore notifications functionality

import ReactNotification from 'react-notifications-component';

// TODO: Restore notifications functionality

import React from 'react';
import {createRoot} from 'react-dom/client';
import {Provider} from 'react-redux';
// TODO: Get rid of deprecated functions usage
import {configureStore, getDefaultMiddleware} from '@reduxjs/toolkit';
// TODO: Restore notifications functionality
// import ReactNotification from 'react-notifications-component';
import 'react-notifications-component/dist/theme.css';
import 'mdb-react-ui-kit/dist/css/mdb.min.css';

remove hardcoded release id

// TODO: remove hardcoded release id

import { createSlice } from '@reduxjs/toolkit';
import axios from 'axios';

const initialState = {
    releaseDetails: {},
    loading: false,
    error: null,
};

const releaseSlice = createSlice({
    name: 'release',
    initialState,
    reducers: {
        fetchBegin: (state, action) => {
            state.loading = true;
            state.error = null;
        },
        fetchSuccess: (state, action) => {
            state.loading = false;
            state.releaseDetails = action.payload;
        },
        fetchError: (state, action) => {
            state.loading = false;
            state.error = action.payload.error;
        },
    },
});

const { actions, reducer } = releaseSlice;
const { fetchBegin, fetchSuccess, fetchError } = actions;

export function getReleaseDetails(dispatch, getState, {apiConfig}) {
    dispatch(fetchBegin());

    // TODO: remove hardcoded release id
    axios.get(`${apiConfig.url}/releases/12829`)
        .then((res) => {
            dispatch(fetchSuccess(res.data));
        })
        .catch((error) => {
            dispatch(fetchError(error));
        });
}

export default reducer;

Merge this config once `image/avif` is in the mime-db (upstream issue)

https://github\.com/jshttp/mime\-db

// TODO: Merge this config once `image/avif` is in the mime-db (upstream issue)

          // match the requirements. When no loader matches it will fall
          // back to the "file" loader at the end of the loader list.
          oneOf: [
            // TODO: Merge this config once `image/avif` is in the mime-db (upstream issue)
            // https://github.com/jshttp/mime-db
            {
              test: [/\.avif$/],

Disable devtools in production

devTools: true, // TODO: Prod-prep: disable devtools in production

            extraArgument: config,
        },
    }),
    devTools: true, // TODO: Prod-prep: disable devtools in production
});

const root = createRoot(document.getElementById('root'));
root.render(
    <Provider store={store}>
        {/* TODO: Restore notifications functionality */}
        {/* <ReactNotification /> */}
        <App />
    </Provider>,

Replace bogus genres alternatives with fetched from DB

// TODO: Replace bogus genres alternatives with fetched from DB

import { changeSearchQuery } from '../../redux/search';
import { ARTIST_QUERY, RELEASE_QUERY, SONG_QUERY, GENRE_QUERY } from '../../redux/search';

// TODO: Replace bogus genres alternatives with fetched from DB
const genreOptions = [
    { value: 'rock', label: 'Rock' },
    { value: 'notrock', label: 'Not Rock' },
];

function SearchOptions(props) {

    return (
        <MDBContainer className="mb-2 pl-0 ml-0">
            <MDBCol md="9" className="pl-0">
                <MDBCard>
                    <p className="h4 text-center py-4">Advanced Search</p>
                    <MDBRow className="ml-2 mr-2 p-3">
                        <MDBCol md="6">
                            <form>
                                <div className="grey-text">
                                    <MDBInput
                                        label="Artist"
                                        onChange={
                                            (event) => {
                                                props.changeSearchQuery(
                                                    ARTIST_QUERY,
                                                    event.target.value,
                                                );
                                            }
                                        }
                                    />
                                    <MDBInput
                                        label="Track"
                                        className='mt-2'
                                        onChange={
                                            (event) => {
                                                props.changeSearchQuery(
                                                    SONG_QUERY,
                                                    event.target.value,
                                                );
                                            }
                                        }
                                    />
                                </div>
                            </form>
                        </MDBCol>
                        <MDBCol md="6">
                            <div className="grey-text">
                                <MDBInput
                                    label="Album"
                                    onChange={
                                        (event) => {
                                            props.changeSearchQuery(
                                                RELEASE_QUERY,
                                                event.target.value,
                                            );
                                        }
                                    }
                                />
                                <Select
                                    className='mt-2'
                                    onChange={
                                        (option) => {
                                            props.changeSearchQuery(
                                                GENRE_QUERY,
                                                option.value,
                                            );
                                        }
                                    }
                                    options={ genreOptions }
                                />
                            </div>
                        </MDBCol>
                    </MDBRow>
                </MDBCard>
            </MDBCol>
        </MDBContainer>
    );
}

const mapStateToProps = (state) => ({});

Actualize production-specific deps

Review dependencies and update where required or recommended. Remove vestigial/questionable components. The packages include but not limited to:

  • @babel/core and @babel/runtime
  • @pmmmwh/react-refresh-webpack-plugin
  • @svgr/webpack
  • babel-loader
  • babel-preset-react-app
  • bfj
  • case-sensitive-paths-webpack-plugin
  • css-loader
  • css-minimizer-webpack-plugin
  • eslint-webpack-plugin
  • file-loader
  • fs-extra
  • html-webpack-plugin
  • mini-css-extract-plugin
  • all postcss related stuff
  • react-refresh
  • resolve-url-loader
  • sass-loader
  • source-map-loader
  • style-loader
  • tailwindcss
  • terser-webpack-plugin
  • webpack-manifest-plugin
  • workbox-webpack-plugin

Get rid of deprecated functions usage

// TODO: Get rid of deprecated functions usage

import React from 'react';
import {createRoot} from 'react-dom/client';
import {Provider} from 'react-redux';
// TODO: Get rid of deprecated functions usage
import {configureStore, getDefaultMiddleware} from '@reduxjs/toolkit';
// TODO: Restore notifications functionality
// import ReactNotification from 'react-notifications-component';
import 'react-notifications-component/dist/theme.css';
import 'mdb-react-ui-kit/dist/css/mdb.min.css';

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.