Skip to content

Commit a974b90

Browse files
svenefftingeChristian Weichel
authored and
Christian Weichel
committed
styling of library items
1 parent ad3c7c6 commit a974b90

File tree

4 files changed

+27
-15
lines changed

4 files changed

+27
-15
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ build/
66
!electron/build/
77
src-gen/
88
arduino-ide-*/webpack.config.js
9-
.DS_Store
9+
.DS_Store
10+
/workspace/static

arduino-ide-extension/src/browser/components/component-list/component-list-item.tsx

+3-4
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,12 @@ export class ComponentListItem extends React.Component<ComponentListItem.Props>
2222
const style = ComponentListItem.Styles;
2323
const name = <span className={style.NAME_CLASS}>{item.name}</span>;
2424
const author = <span className={style.AUTHOR_CLASS}>{item.author}</span>;
25-
const installedVersion = !!item.installedVersion && <React.Fragment>
25+
const installedVersion = !!item.installedVersion && <div className={style.VERSION_INFO_CLASS}>
2626
<span className={style.VERSION_CLASS}>Version {item.installedVersion}</span>
2727
<span className={style.INSTALLED_CLASS}>INSTALLED</span>
28-
</React.Fragment>;
28+
</div>;
2929

3030
const summary = <div className={style.SUMMARY_CLASS}>{item.summary}</div>;
31-
const description = !!item.description && <div className={style.DESCRIPTION_CLASS}>{item.description}</div>;
3231

3332
const moreInfo = !!item.moreInfoLink && <a href={item.moreInfoLink} onClick={this.onClick}>More info</a>;
3433
const install = this.props.install && item.installable && !item.installedVersion &&
@@ -41,7 +40,6 @@ export class ComponentListItem extends React.Component<ComponentListItem.Props>
4140
</div>
4241
<div className={style.CONTENT_CLASS}>
4342
{summary}
44-
{description}
4543
</div>
4644
<div className={style.FOOTER_CLASS}>
4745
{moreInfo}
@@ -63,6 +61,7 @@ export namespace ComponentListItem {
6361
export namespace Styles {
6462
export const LIST_ITEM_CLASS = 'component-list-item';
6563
export const HEADER_CLASS = 'header';
64+
export const VERSION_INFO_CLASS = 'version-info';
6665
export const CONTENT_CLASS = 'content';
6766
export const FOOTER_CLASS = 'footer';
6867
export const INSTALLED_CLASS = 'installed';

arduino-ide-extension/src/browser/components/component-list/search-bar.tsx

+3-4
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@ export class SearchBar extends React.Component<SearchBar.Props> {
88
}
99

1010
render(): React.ReactNode {
11-
return <form className={SearchBar.Styles.SEARCH_BAR_CLASS}>
12-
<input
11+
return <input
12+
className={SearchBar.Styles.SEARCH_BAR_CLASS}
1313
type='text'
1414
placeholder='Search'
1515
size={1}
1616
value={this.props.filterText}
1717
onChange={this.handleFilterTextChange}
18-
/>
19-
</form>;
18+
/>;
2019
}
2120

2221
private handleFilterTextChange(event: React.ChangeEvent<HTMLInputElement>): void {

arduino-ide-extension/src/browser/style/list-widget.css

+19-6
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,18 @@
99

1010
.arduino-list-widget .search-bar > input {
1111
margin: 0px 5px 0px 5px;
12-
width: 100%;
12+
width: 95%;
13+
}
14+
15+
.filterable-list-container {
16+
padding: 0 10px 0 15px;
17+
display: flex;
18+
flex-direction: column;
19+
align-items: stretch;
1320
}
1421

1522
.component-list-item {
16-
padding: 10px;
23+
padding: 10px 0 10px 0;
1724
font-size: var(--theia-ui-font-size1);
1825
}
1926

@@ -33,6 +40,13 @@
3340
.component-list-item .header {
3441
padding-bottom: 2px;
3542
display: flex;
43+
flex-direction: column;
44+
}
45+
46+
.component-list-item .header .version-info {
47+
display: flex;
48+
justify-content: space-between;
49+
align-items: center;
3650
}
3751

3852
.component-list-item .header .name {
@@ -45,23 +59,22 @@
4559
}
4660

4761
.component-list-item .header .version {
48-
margin-left: auto;
49-
justify-self: end;
5062
color: var(--theia-ui-font-color2);
5163
}
5264

5365
.component-list-item .header .installed {
5466
margin-left: 4px;
5567
justify-self: end;
5668
background-color: var(--theia-accent-color2);
57-
padding: 4px;
69+
padding: 2px 4px 2px 4px;
5870
font-size: 10px;
5971
font-weight: bold;
6072
max-height: calc(1em + 4px);
61-
color: var(--theia-layout-color0);
73+
color: var(--theia-inverse-ui-font-color0);
6274
}
6375

6476
.component-list-item .footer {
77+
padding-top: 5px;
6578
display: flex;
6679
}
6780

0 commit comments

Comments
 (0)