mirror of
https://github.com/MichaelMure/git-bug.git
synced 2024-12-14 17:51:44 +03:00
webui: start reorganizing the component structure
This commit is contained in:
parent
680dd91c0c
commit
8b85780d76
@ -49,7 +49,8 @@
|
||||
"test": "react-scripts test --env=jsdom",
|
||||
"eject": "react-scripts eject",
|
||||
"generate": "graphql-codegen",
|
||||
"lint": "eslint src --ext .ts --ext .tsx --ext .js --ext .jsx --ext .graphql"
|
||||
"lint": "eslint src --ext .ts --ext .tsx --ext .js --ext .jsx --ext .graphql",
|
||||
"clean": "rimraf src/**.generated.* src/schema.json src/gqlTypes.* src/fragmentTypes.*"
|
||||
},
|
||||
"proxy": "http://localhost:3001",
|
||||
"browserslist": [
|
||||
|
@ -1,8 +0,0 @@
|
||||
fragment Label on Label {
|
||||
name
|
||||
color {
|
||||
R
|
||||
G
|
||||
B
|
||||
}
|
||||
}
|
@ -1,5 +1,4 @@
|
||||
#import "../Label.graphql"
|
||||
#import "../Author.graphql"
|
||||
#import "../components/fragments.graphql"
|
||||
|
||||
fragment Bug on Bug {
|
||||
id
|
||||
|
@ -2,9 +2,9 @@ import Typography from '@material-ui/core/Typography/Typography';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import React from 'react';
|
||||
|
||||
import Author from '../Author';
|
||||
import Date from '../Date';
|
||||
import Label from '../Label';
|
||||
import Author from '../components/Author';
|
||||
import Date from '../components/Date';
|
||||
import Label from '../components/Label';
|
||||
|
||||
import { BugFragment } from './Bug.generated';
|
||||
import CommentForm from './CommentForm';
|
||||
|
@ -6,7 +6,7 @@ import TextField from '@material-ui/core/TextField';
|
||||
import { makeStyles, Theme } from '@material-ui/core/styles';
|
||||
import React, { useState, useRef } from 'react';
|
||||
|
||||
import Content from '../Content';
|
||||
import Content from '../components/Content';
|
||||
|
||||
import { useAddCommentMutation } from './CommentForm.generated';
|
||||
import { TimelineDocument } from './TimelineQuery.generated';
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import React from 'react';
|
||||
|
||||
import Author from '../Author';
|
||||
import Date from '../Date';
|
||||
import Label from '../Label';
|
||||
import Author from '../components/Author';
|
||||
import Date from '../components/Date';
|
||||
import Label from '../components/Label';
|
||||
|
||||
import { LabelChangeFragment } from './LabelChangeFragment.generated';
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
#import "../Author.graphql"
|
||||
#import "../Label.graphql"
|
||||
#import "../components/fragments.graphql"
|
||||
|
||||
fragment LabelChange on LabelChangeTimelineItem {
|
||||
date
|
||||
|
@ -2,10 +2,9 @@ import Paper from '@material-ui/core/Paper';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import React from 'react';
|
||||
|
||||
import Author from '../Author';
|
||||
import { Avatar } from '../Author';
|
||||
import Content from '../Content';
|
||||
import Date from '../Date';
|
||||
import Author, { Avatar } from '../components/Author';
|
||||
import Date from '../components/Date';
|
||||
import Content from '../components/Content';
|
||||
|
||||
import { AddCommentFragment } from './MessageCommentFragment.generated';
|
||||
import { CreateFragment } from './MessageCreateFragment.generated';
|
||||
|
@ -1,4 +1,4 @@
|
||||
#import "../Author.graphql"
|
||||
#import "../components/fragments.graphql"
|
||||
|
||||
fragment AddComment on AddCommentTimelineItem {
|
||||
createdAt
|
||||
|
@ -1,4 +1,4 @@
|
||||
#import "../Author.graphql"
|
||||
#import "../components/fragments.graphql"
|
||||
|
||||
fragment Create on CreateTimelineItem {
|
||||
createdAt
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import React from 'react';
|
||||
|
||||
import Author from '../Author';
|
||||
import Date from '../Date';
|
||||
import Author from '../components/Author';
|
||||
import Date from '../components/Date';
|
||||
|
||||
import { SetStatusFragment } from './SetStatusFragment.generated';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#import "../Author.graphql"
|
||||
#import "../components/fragments.graphql"
|
||||
|
||||
fragment SetStatus on SetStatusTimelineItem {
|
||||
date
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import React from 'react';
|
||||
|
||||
import Author from '../Author';
|
||||
import Date from '../Date';
|
||||
import Author from '../components/Author';
|
||||
import Date from '../components/Date';
|
||||
|
||||
import { SetTitleFragment } from './SetTitleFragment.generated';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#import "../Author.graphql"
|
||||
#import "../components/fragments.graphql"
|
||||
|
||||
fragment SetTitle on SetTitleTimelineItem {
|
||||
date
|
||||
|
@ -2,7 +2,7 @@ import MAvatar from '@material-ui/core/Avatar';
|
||||
import Tooltip from '@material-ui/core/Tooltip/Tooltip';
|
||||
import React from 'react';
|
||||
|
||||
import { AuthoredFragment } from './Author.generated';
|
||||
import { AuthoredFragment } from './fragments.generated';
|
||||
|
||||
type Props = AuthoredFragment & {
|
||||
className?: string;
|
@ -4,8 +4,8 @@ import parse from 'remark-parse';
|
||||
import remark2react from 'remark-react';
|
||||
import unified from 'unified';
|
||||
|
||||
import ImageTag from './tag/ImageTag';
|
||||
import PreTag from './tag/PreTag';
|
||||
import ImageTag from './ImageTag';
|
||||
import PreTag from './PreTag';
|
||||
|
||||
type Props = { markdown: string };
|
||||
const Content: React.FC<Props> = ({ markdown }: Props) => {
|
@ -6,8 +6,8 @@ import {
|
||||
} from '@material-ui/core/styles/colorManipulator';
|
||||
import React from 'react';
|
||||
|
||||
import { LabelFragment } from './Label.generated';
|
||||
import { Color } from './gqlTypes';
|
||||
import { LabelFragment } from './fragments.generated';
|
||||
import { Color } from '../gqlTypes';
|
||||
|
||||
// Minimum contrast between the background and the text color
|
||||
const contrastThreshold = 2.5;
|
@ -1,3 +1,14 @@
|
||||
# Label.tsx
|
||||
fragment Label on Label {
|
||||
name
|
||||
color {
|
||||
R
|
||||
G
|
||||
B
|
||||
}
|
||||
}
|
||||
|
||||
# Author.tsx
|
||||
fragment authored on Authored {
|
||||
author {
|
||||
name
|
@ -1,5 +1,4 @@
|
||||
#import "../Author.graphql"
|
||||
#import "../Label.graphql"
|
||||
#import "../components/fragments.graphql"
|
||||
|
||||
fragment BugRow on Bug {
|
||||
id
|
||||
|
@ -7,8 +7,8 @@ import ErrorOutline from '@material-ui/icons/ErrorOutline';
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import Date from '../Date';
|
||||
import Label from '../Label';
|
||||
import Date from '../components/Date';
|
||||
import Label from '../components/Label';
|
||||
import { Status } from '../gqlTypes';
|
||||
|
||||
import { BugRowFragment } from './BugRow.generated';
|
||||
|
Loading…
Reference in New Issue
Block a user