Skip to content
This repository was archived by the owner on Jan 14, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
3c28d36
Bugfix in Routes when setting the component.
rNoz Dec 22, 2019
d6d7b00
Added Login mode to the LoginView (User+Password as default, API Key …
rNoz Dec 22, 2019
3a18481
Gitignore without .idea dir.
rNoz Dec 22, 2019
03d2fc5
LoginView tests repaired and added one for the apiKey. Added enzyme-t…
rNoz Dec 23, 2019
08b3bcd
Bugfix: className rendered false instead of empty string.
rNoz Dec 23, 2019
363e174
Bugfix: IssuesTable with Date rendered without date.
rNoz Dec 23, 2019
3c9e9fe
Bugfixes in IssuesTable: tr or td cannot appear as a child of div, ta…
rNoz Dec 23, 2019
7231c7c
Bugfix in InfiniteScroll: window is not PropTypes.element.
rNoz Dec 23, 2019
43d0b49
Bugfix in CommentsSection: p child of p.
rNoz Dec 23, 2019
5ae9944
Bugfix: pause and save state of Timer when unload/exit, preserve stat…
rNoz Dec 24, 2019
3f9bc99
Time tracking is editable (duration and date) when we stop the Timer.
rNoz Dec 24, 2019
2a0b17d
Tray feature: app can hide in tray.
rNoz Dec 25, 2019
40231d5
Modal: close button with cursor pointer.
rNoz Dec 26, 2019
572ef5f
Feature: duration (humanized string, eg. 1m, 2hours 3minutes, 1d 39 s…
rNoz Dec 26, 2019
42c4273
Feature: TimeEntryModal requests confirmation when contents are modif…
rNoz Dec 26, 2019
9df8e04
Time interval optimized when window is hidden (datetime diffs). New f…
rNoz Dec 29, 2019
56f66c2
Added electron mock for ipcRenderer.
rNoz Dec 29, 2019
ff71f5e
Electron updated to latest stable version with support for Tray icon.…
rNoz Jan 3, 2020
1ffba0a
Developed advanced timer controls, settings menu in window, automatic…
rNoz Jan 3, 2020
ea04d28
Bugfix: styles in advanced controls. Bugfix: jest and electron now sh…
rNoz Jan 4, 2020
56a7c36
Added 2 custom icons (1 minute rewind and fastforward) for the advanc…
rNoz Jan 4, 2020
ea8e4b7
README.md with new features (docs, images). Version updated to 1.1.0 …
rNoz Jan 4, 2020
73e7907
AUR PKGBUILD with redshape.desktop bugfixed to support the hicolor/0x…
rNoz Jan 4, 2020
a37199c
Bugfix: correctly save the state of the timer (duration and comments)…
rNoz Jan 5, 2020
8f51616
Bugfix: DatePicker is not updated properly (onDayChange instead of on…
rNoz Jan 10, 2020
d38331a
Updated PKGBUILD with new version. Releases updated.
rNoz Jan 10, 2020
9e6dd89
Bugfix: TimeEntryModal spent_on date is casted to ISO string, instead…
rNoz Jan 13, 2020
5c8c533
Feature: progress bars with two modes: progress-gradient (5 colors be…
rNoz Jan 13, 2020
d45083a
Custom fields are shown in IssueDetailsPage (if available).
rNoz Jan 14, 2020
f7f7d70
New feature: added IssueModal in IssueDetailsPage to be able to updat…
rNoz Jan 14, 2020
491dd85
Progress of issue can be edited using an input range instead of an in…
rNoz Jan 15, 2020
9dd17b2
Show errors from requests if available in response.data.errors.
rNoz Jan 16, 2020
3cd2673
IssuesTable: estimated time is fixed to 2 decimals.
rNoz Jan 16, 2020
6f8fe6c
New features: editable estimated time and due date in issue, omitted …
rNoz Jan 16, 2020
26fd88b
Added setting issue progress slider with two steps mode: 10% (default…
rNoz Jan 16, 2020
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ coverage/
dist/
build/
.env
.idea
support/package-aur/*
!support/package-aur/manager.sh
!support/package-aur/PKGBUILD
196 changes: 194 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@

A time tracker for [Redmine](https://www.redmine.org) built on [Electron](https://github.com/electron/electron).

> This repo is a fork of the original project. Have a look to the section `rNoz changes` to see the new features.
>
> I would like to integrate these changes in the original one, but until then, I use my own repo.
>
> Acknowledgements: Daniyil Vasylenko and Group4Layers (see the section `Acknowledgements`)

Re-designs the way tasks, task info, tracked time and communication is done on redmine.

The project was originally developed for a MVP portfolio showcase, but there is some roadmap planned with new features that might be added once I find enough of free time.
Expand All @@ -16,18 +22,19 @@ Thanks for using, or considering to use this project. I would love to hear some
## Installation

### macOS

Download the latest [Redshape release](https://github.com/Spring3/redshape/releases/latest).

The application will automatically update when a new release is available.

### Windows

Download the latest [Redshape installer](https://github.com/Spring3/redshape/releases).

You can download the .exe installer or the web installer. Both automatically detect the system architecture and set up the correct version.

The application will automatically update when a new release is available.


### Linux

Download the latest [Redshape release](https://github.com/Spring3/redshape/releases/latest).
Expand All @@ -39,6 +46,9 @@ The application will automatically update when a new release is available.

Created by [Daniyil Vasylenko](https://github.com/Spring3)

## Contributors

rNoz <rnoz.commits@gmail.com> (Group4Layers member).

## FAQ

Expand All @@ -48,6 +58,188 @@ Created by [Daniyil Vasylenko](https://github.com/Spring3)
#### - Markdown is displayed incorrectly
Please ask your Redmine admin user to check if it's enabled in `Administration -> General -> Text Formatting` menu. This path may change with the upcoming redmine releases, so please refer to Redmine documentation to find out exactly where this switch is located for your version of Redmine

#### - My antivirus / Defender / Mac OS warns that it's not safe to run this app
#### - My antivirus / Defender / Mac OS warns that it's not safe to run this app
Mac OS build was signed by a **self-signed certificate**, while Windows and Linux builds **were not signed at all**. In such case, you will see this warnings upon download or running the application / installation, saying that this app is not safe to run or that it was provided by an unknown developer and is not safe to run.

## rNoz changes

### Auth

- Login accepts both API or Username+Password as login method:

![](docs/changes/login_mode_api.png)

### Durations

- Duration: you can use hours, and it is rounded as it will be used in Redmine

![](docs/changes/accept_hours.png)

- Duration: hours are not positive enough (15s rounded => 0)

![](docs/changes/error_nonpositive_enough.png)

- Duration: empty

![](docs/changes/error_empty.png)

- Duration: negative

![](docs/changes/error_negative.png)

- Duration: duration formats (2 examples)

![](docs/changes/accept_duration_1.png)

![](docs/changes/accept_duration_2.png)

- Time Entries are casted to duration formats when editing. For example, this:

![](docs/changes/timeentries.png)

When it is clicked, it is automatically converted to the most comfortable duration format:

![](docs/changes/timeentries_modal_duration.png)

- When tracking an issue:

![](docs/changes/timer.png)

When it is stopped, it is properly filled:

![](docs/changes/timer_stop_modal_duration.png)

- Added info tooltip for the duration field:

![](docs/changes/tooltip.png)

### TimeEntryModal

- When closing the modal of a modified entry or non saved entry (stopped), we need to confirm:

![](docs/changes/timeentreymodal_confirm_modified.png)

- Validations in TimeEntryModal are performed per field (onBlur), to avoid annoying errors in fields we didn't modify yet.

### Tray

- Added tray, allowing to hide in tray/show window, because most of the time the Redshape window is not needed.

- Tray with pause/resume button of current timer (long/short issue subject):

![](docs/changes/tray_pause_long.png)
![](docs/changes/tray_resume_short.png)

- Tick optimizations when using Redshape in tray. This are debug messages not present in the app. They are just printed here to show
the optimization. We reduce the CPU usage.

![](docs/changes/tracker_optimization.png)

- New icons are provided for the tray, showing when it is tracking an issue (play, pause) or not.

### Advanced Timer Controls

- The view can be advanced or simple. When using advanced view, we can use new buttons to modify the current time (1 or 5 minutes) and write temporary comments. Using these, we can directly modify the time in case we were interrupted in the task (avoid remembering those changes until the end). Also, the comments help us in workflows where our time entry can be hours long.

![](docs/changes/advanced_timer_controls_long.png)

![](docs/changes/advanced_timer_controls_short.png)

When we finish, we have updated our TimeEntryModal:

![](docs/changes/advanced_timer_controls_to_time_entry.png)

### Idle behavior

- Redshape can pause the timer if it detects the system is idle for a range of times (5, 10 o 15 minutes). It will warn with notifications (15s. warning time before pausing).

- Optionally, it can automatically discard the idle time from the current timer when it is paused.

### Settings

- New settings menu to be used per user/redmine host.

![](docs/changes/settings_menu.png)

### Minor bugfixes

- There are other minor bugfixes and features not listed but can be read in the git log. Those are usually related with UX, propagating correctly the state, etc.

### Issue progress bars

- Progress (done ratio) shows a gradient of 5 colors between red-yellow-green (0, 20, 40, 60, 80, 100%).

Time cap shows a green bar between 0-80% and yellow-green in the last 20%. When it is overtime (eg. 150%), a red bar is shown with the overtime proportion (eg. 50/150).

Tooltips added showing the specific percentage value.

![](docs/changes/progressbars.png)

### Custom fields

- Custom fields are shown in the issue details page (if available).

![](docs/changes/custom_fields.png)

### Edit issue

- Progress (done ratio) can be edited in a new modal. It supports an input range to slide the percetage of progress (0 to 100).

![](docs/changes/edit_issue_progress.png)

- Estimation (hours) and Due date can also be edited.

![](docs/changes/edit_issue_estimation_due_date.png)

- If editing a parent task, some non-editable fields are omitted.

![](docs/changes/edit_issue_parent.png)

### Issue fields

- If is a parent task, it shows links to each of its subtasks.

If is a parent task, it shows the totals (estimated and spent time).

![](docs/changes/issue_subtasks.png)

### More settings

- Issue progress slider can be changed with 1% step if configured (by default is 10%).
Enable this if you have support in the server side (ruby, redmine) to use every percentage (33%, 81%, etc).

![](docs/changes/settings_progress.png)


### AUR package

Electron-builder does not offer aur packages. Therefore, in the directory `support/package-aur` we can build those for ArchLinux/Manjaro distributions. It is "optimized" and just installs around 50MiB, using the system electron, as it is exposed here [issue 4059](https://github.com/electron-userland/electron-builder/issues/4059).

```sh
bash support/package-aur/manager.sh pack # can be omitted if using the archive from the repo
bash support/package-aur/manager.sh makepkg
```

Before publishing a release, you have to update the PKGBUILD:

```sh
# using npm script:
npm run release:aur

# alternatively, with the shell:
bash support/package-aur/manager.sh pack pkgbuild
```

The second target (`pkgbuild`) will update the version and md5sums of the PKGBUILD.

### Known issues

- Tray new icons should be ported for Mac (png to icns; png2icns gives black background).
- Changes not tested in Mac or Windows.
- One test is omitted from the original repo (TimeEntryModal, it should match the snapshot) because it never finishes (throws JS heap out of memory).
- As soon as Electron v8 is stable, it should be used (package.json). Redshape is prepared for future features (timeoutType), keeping the notification when the timer is paused due to system idle.

## Acknowledgements

- [Daniyil Vasylenko](redshape.app@gmail.com): original author of this interesting and useful project.
- [Group4Layers](https://www.group4layers.com): it is possible to contribute to this repository and achieve the new features provided here thanks to this company and its efforts to promote and work with open source. The two weeks of dedication have been given in hours assigned by the company.
8 changes: 7 additions & 1 deletion __mocks__/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ const remote = {
}
};

const ipcRenderer = {
on: jest.fn(),
send: jest.fn(),
};

module.exports = {
remote
remote,
ipcRenderer,
};
4 changes: 4 additions & 0 deletions __mocks__/ipc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
send: jest.fn(),
setupTimer: jest.fn(),
};
Binary file added assets/icon-pause.ico
Binary file not shown.
Binary file added assets/icon-pause.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icon-play.ico
Binary file not shown.
Binary file added assets/icon-play.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion common/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,16 @@ const handleReject = (error) => {
// if this request was not cancelled
if (!axios.isCancel(error)) {
let errorMessage = 'Error';
if (error.status) {
let response = error.response;
let data = response && response.data;
let errors = data && data.errors;
if (errors) {
if (errors.length > 1){
errorMessage = `${errorMessage}s - ${errors.join(' - ')}`;
}else{
errorMessage = `${errorMessage} ${errors[0]}`;
}
}else if (error.status) {
errorMessage = `${errorMessage} ${error.status}`;
}
errorMessage = `${errorMessage} (${error.statusText || error.message})`;
Expand Down
Binary file added docs/changes/accept_duration_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/changes/accept_duration_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/changes/accept_hours.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/changes/advanced_timer_controls_long.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/changes/advanced_timer_controls_short.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/changes/custom_fields.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/changes/edit_issue_estimation_due_date.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/changes/edit_issue_parent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/changes/edit_issue_progress.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/changes/error_empty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/changes/error_negative.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/changes/error_nonpositive_enough.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/changes/issue_subtasks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/changes/login_mode_api.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/changes/progressbars.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/changes/settings_menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/changes/settings_progress.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/changes/timeentreymodal_confirm_modified.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/changes/timeentries.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/changes/timeentries_modal_duration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/changes/timer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/changes/timer_stop_modal_duration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/changes/tooltip.png
Binary file added docs/changes/tracker_optimization.png
Binary file added docs/changes/tray_pause_long.png
Binary file added docs/changes/tray_resume_short.png
4 changes: 3 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ module.exports = {
clearMocks: true,
collectCoverage: true,
setupFilesAfterEnv: ['./setupJest.js'],
snapshotSerializers: ["enzyme-to-json/serializer"],
moduleNameMapper: {
'\\.(css|less)$': '<rootDir>/__mocks__/style-mock.js',
'\\.(png)$': '<rootDir>/__mocks__/image-mock.js'
'\\.(png)$': '<rootDir>/__mocks__/image-mock.js',
'ipc$': '<rootDir>/__mocks__/ipc.js'
}
};
Loading