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

Set placeholder label for empty activities table #164

Merged
merged 3 commits into from
May 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

See [Release](https://github.com/itsallcode/white-rabbit/releases/tag/v1.7.0) / [Milestone](https://github.com/itsallcode/white-rabbit/milestone/9?closed=1)

### Added

* [#164](https://github.com/itsallcode/white-rabbit/pull/164): Improve label of empty activities table.

## [1.6.0] - 2021-05-30

See [Release](https://github.com/itsallcode/white-rabbit/releases/tag/v1.6.0) / [Milestone](https://github.com/itsallcode/white-rabbit/milestone/8?closed=1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import javafx.beans.property.SimpleObjectProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.scene.control.Label;
import javafx.scene.control.TableCell;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
Expand Down Expand Up @@ -110,6 +111,7 @@ public TableView<ActivityPropertyAdapter> initTable()
table.setEditable(true);
table.getColumns().addAll(createColumns());
table.setId("activities-table");
table.setPlaceholder(new Label("No activities for selected day. Click the + button to add an activity."));
table.getSelectionModel().selectedItemProperty()
.addListener((observable, oldValue, newValue) -> selectedActivity
.set(newValue != null ? newValue.getRecord() : null));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ void beginAndEndDeletedWhenChangingDayTypeToSick()
dayTable.assertBeginAndEnd(currentDayRowIndex, now, now);

dayTable.selectDayType(currentDayRowIndex, DayType.SICK);
TestUtil.sleepShort();

dayTable.assertBeginAndEnd(currentDayRowIndex, null, null);
}
Expand Down