File tree 7 files changed +33
-19
lines changed
components/canvas-accessible/components
7 files changed +33
-19
lines changed Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ export const CanvasPod: React.FC = () => {
233
233
} , [ modalDialog . isOpen , canvasSchema . selectedElementId ] ) ;
234
234
235
235
return (
236
- < div
236
+ < main
237
237
className = { classes . container }
238
238
ref = { containerRef }
239
239
onScroll = { handleScroll }
@@ -282,6 +282,6 @@ export const CanvasPod: React.FC = () => {
282
282
/>
283
283
) }
284
284
</ div >
285
- </ div >
285
+ </ main >
286
286
) ;
287
287
} ;
Original file line number Diff line number Diff line change @@ -28,20 +28,24 @@ export const CollectionAccessible: React.FC<Props> = props => {
28
28
< >
29
29
< h3 ref = { collectionRefs . current [ table . id ] } >
30
30
{ table . tableName } collection
31
- { ! isTabletOrMobileDevice ? (
32
- < >
31
+ </ h3 >
32
+ { ! isTabletOrMobileDevice ? (
33
+ < ul >
34
+ < li >
33
35
< button type = "button" onClick = { ( ) => onEditTable ( table ) } >
34
36
Edit { table . tableName } collection
35
37
</ button >
38
+ </ li >
39
+ < li >
36
40
< button
37
41
type = "button"
38
42
onClick = { ( ) => onDeleteSelectedItem ( table . id ) }
39
43
>
40
44
Delete { table . tableName } collection
41
45
</ button >
42
- </ >
43
- ) : null }
44
- </ h3 >
46
+ </ li >
47
+ </ ul >
48
+ ) : null }
45
49
< h4 > Fields for { table . tableName } collection</ h4 >
46
50
< FieldList fieldList = { table . fields } listName = { table . tableName } />
47
51
< TableRelationsAccessible
Original file line number Diff line number Diff line change @@ -8,10 +8,18 @@ interface Props {
8
8
}
9
9
10
10
export const Field : React . FC < Props > = props => {
11
- const { field, listName } = props ;
11
+ const { field } = props ;
12
12
13
13
const renderNNElement = ( NN ?: boolean ) => {
14
- if ( NN ) return < span > NN</ span > ;
14
+ if ( NN ) return < span > Not Null</ span > ;
15
+ } ;
16
+ const renderArrayElement = ( isArray ?: boolean ) => {
17
+ if ( isArray )
18
+ return (
19
+ < >
20
+ < span > array</ span >
21
+ </ >
22
+ ) ;
15
23
} ;
16
24
17
25
const renderChildrenElement = ( name : string , children ?: FieldVm [ ] ) => {
@@ -20,9 +28,10 @@ export const Field: React.FC<Props> = props => {
20
28
} ;
21
29
22
30
return (
23
- < li aria-label = { `${ listName } field` } >
24
- < span > { field . name } </ span >
25
- < span > { field . type } </ span >
31
+ < li >
32
+ < span > { field . name } </ span >
33
+ < span > { field . type } </ span >
34
+ { renderArrayElement ( field . isArray ) }
26
35
{ renderNNElement ( field . isNN ) }
27
36
{ renderChildrenElement ( field . name , field . children ) }
28
37
</ li >
Original file line number Diff line number Diff line change @@ -37,9 +37,9 @@ interface Props {
37
37
38
38
const INPUT_NAME = 'Field for field ' ;
39
39
const CHECKBOX_PK = 'Primary key for field ' ;
40
- const CHECKBOX_FK = 'Checkbox fk for field ' ;
41
- const CHECKBOX_ARRAY = 'Checkbox isArray for field ' ;
42
- const CHECKBOX_ISNN = 'Checkbox isNN for field ' ;
40
+ const CHECKBOX_FK = 'Foreign key for field ' ;
41
+ const CHECKBOX_ARRAY = 'Array for field ' ;
42
+ const CHECKBOX_ISNN = 'Not null for field ' ;
43
43
const SELECT = 'Select field type for' ;
44
44
const NESTED_FIELD_ADD_FIELD_LABEL = 'Add nested field for ' ;
45
45
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ export const EditTableComponent: React.FC<Props> = props => {
71
71
type = "text"
72
72
value = { table . tableName }
73
73
onChange = { handleChangeTableName }
74
+ onFocus = { e => e . currentTarget . select ( ) }
74
75
/>
75
76
</ label >
76
77
</ div >
Original file line number Diff line number Diff line change @@ -29,11 +29,11 @@ export const FooterComponent: React.FC = () => {
29
29
? getFileNameCanvasIsPristine ( filename , NEW_DOCUMENT_NAME )
30
30
: getFileNameCanvasDirty ( filename , NEW_DOCUMENT_NAME , ASTERISK ) ;
31
31
return (
32
- < div className = { classes . footerText } >
32
+ < footer className = { classes . footerText } >
33
33
< span > { isDevice ? documentNameMobile ( ) : documentName ( ) } </ span >
34
34
< button onClick = { toggleTheme } className = "mobile-only" >
35
35
{ theme . themeMode === 'dark' ? < LightIcon /> : < DarkIcon /> }
36
36
</ button >
37
- </ div >
37
+ </ footer >
38
38
) ;
39
39
} ;
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import classes from './toolbar.pod.module.css';
20
20
21
21
export const ToolbarPod : React . FC = ( ) => {
22
22
return (
23
- < div className = { classes . container } >
23
+ < header className = { classes . container } >
24
24
< ul >
25
25
< li >
26
26
< NewButton />
@@ -67,6 +67,6 @@ export const ToolbarPod: React.FC = () => {
67
67
< ThemeToggleButton darkLabel = "Dark Mode" lightLabel = "Light Mode" />
68
68
</ li >
69
69
</ ul >
70
- </ div >
70
+ </ header >
71
71
) ;
72
72
} ;
You can’t perform that action at this time.
0 commit comments