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

Implement 3-column UI #63

Merged
merged 4 commits into from Oct 15, 2019

Conversation

dvrylc
Copy link

@dvrylc dvrylc commented Oct 14, 2019

Closes #48

  • Shift content block to center column
  • Add placeholder right column for news feed
  • Refactor basic styles

- Shift content block to center column
- Add placeholder right column for news feed
- Refactor basic styles
@dvrylc dvrylc changed the title Implement 3-column UI, closes #48 Implement 3-column UI Oct 15, 2019
Comment on lines -72 to -105
private void setAccelerators() {
setAccelerator(helpMenuItem, KeyCombination.valueOf("F1"));
}

/**
* Sets the accelerator of a MenuItem.
* @param keyCombination the KeyCombination value of the accelerator
*/
private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) {
menuItem.setAccelerator(keyCombination);

/*
* TODO: the code below can be removed once the bug reported here
* https://bugs.openjdk.java.net/browse/JDK-8131666
* is fixed in later version of SDK.
*
* According to the bug report, TextInputControl (TextField, TextArea) will
* consume function-key events. Because CommandBox contains a TextField, and
* ResultDisplay contains a TextArea, thus some accelerators (e.g F1) will
* not work when the focus is in them because the key event is consumed by
* the TextInputControl(s).
*
* For now, we add following event filter to capture such key events and open
* help window purposely so to support accelerators even when focus is
* in CommandBox or ResultDisplay.
*/
getRoot().addEventFilter(KeyEvent.KEY_PRESSED, event -> {
if (event.getTarget() instanceof TextInputControl && keyCombination.match(event)) {
menuItem.getOnAction().handle(new ActionEvent());
event.consume();
}
});
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good that you removed code that was deemed unnecessary, especially the menubar which is not part of our product UI

Comment on lines +1 to +50
// General UI
.root, .list-cell {
-fx-background-color: white;
}
.list-cell:selected {
-fx-background-color: #eee;
}

.list-cell Label,
.list-cell:selected Label {
-fx-text-fill: black;
}

// Utilities
.container {
-fx-padding: 10;
}

.plain-border-box {
-fx-border-color: #ccc;
-fx-border-radius: 0;
-fx-border-insets: 0;
-fx-background-color: white;
-fx-background-radius: 0;
-fx-background-insets: 0;
}

// Person card
.list-item {
-fx-padding: 10 0;
-fx-border-width: 0 0 1 0;
-fx-border-color: #ccc;
}

#tags {
-fx-padding: 5 0 0 0;
-fx-hgap: 5;
-fx-vgap: 5;
}

#tags Label {
-fx-text-fill: white;
-fx-padding: 5;
-fx-background-color: orange;
}

// Statusbar
.statusbar {
-fx-padding: 0 10 10;
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice that you came up with a theme for the app instead of the same AB3 theme.

Comment on lines +9 to +11
<Label fx:id="name" text="\$first" wrapText="true"/>
<Label fx:id="address" text="\$address" wrapText="true"/>
<Label fx:id="category" text="\$category" wrapText="true"/>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition of wraptext here!

@jakq
Copy link

jakq commented Oct 15, 2019

Overall, sick edits to the UI!! Really like the plain white minimalistic view, like the apple fan you are :')

@jakq jakq closed this Oct 15, 2019
@jakq jakq reopened this Oct 15, 2019
@jakq jakq merged commit e296e7b into AY1920S1-CS2103T-W11-3:master Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move main content block to column 2
2 participants