diff --git a/CHANGELOG.md b/CHANGELOG.md index 67f42081..8c31993f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/jfxui/src/main/java/org/itsallcode/whiterabbit/jfxui/table/activities/ActivitiesTable.java b/jfxui/src/main/java/org/itsallcode/whiterabbit/jfxui/table/activities/ActivitiesTable.java index 832984f1..4bbf002a 100644 --- a/jfxui/src/main/java/org/itsallcode/whiterabbit/jfxui/table/activities/ActivitiesTable.java +++ b/jfxui/src/main/java/org/itsallcode/whiterabbit/jfxui/table/activities/ActivitiesTable.java @@ -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; @@ -110,6 +111,7 @@ public TableView 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)); diff --git a/jfxui/src/uiTest/java/org/itsallcode/whiterabbit/jfxui/DayTableTest.java b/jfxui/src/uiTest/java/org/itsallcode/whiterabbit/jfxui/DayTableTest.java index c68cd570..3c722326 100644 --- a/jfxui/src/uiTest/java/org/itsallcode/whiterabbit/jfxui/DayTableTest.java +++ b/jfxui/src/uiTest/java/org/itsallcode/whiterabbit/jfxui/DayTableTest.java @@ -108,6 +108,7 @@ void beginAndEndDeletedWhenChangingDayTypeToSick() dayTable.assertBeginAndEnd(currentDayRowIndex, now, now); dayTable.selectDayType(currentDayRowIndex, DayType.SICK); + TestUtil.sleepShort(); dayTable.assertBeginAndEnd(currentDayRowIndex, null, null); }