Artemis icon indicating copy to clipboard operation
Artemis copied to clipboard

`Development`: Add git commit to navbar version in dev mode

Open TheZoker opened this issue 2 years ago • 7 comments

Checklist

General

Motivation and Context

Description

This adds a git commit id into the header, when Artemis is run in development mode.

image

Not displayed in the prod mode: image

Steps for Testing

  1. Start Artemis in dev mode
  2. Have a look at the version in the header

Review Progress

Code Review

  • [ ] Review 1
  • [ ] Review 2

Manual Tests

  • [ ] Test 1
  • [ ] Test 2

Test Coverage

Class/File Branch Line

Screenshots

TheZoker avatar Aug 14 '22 23:08 TheZoker

I removed the additional service and moved to the already existing profile service. Thanks for the hints!

Since this PR, you can see which branch was used by just visiting the /managment/info page and it will tell you a lot of information. I think having the git commit in the header when in dev (as suggested by Stefan) is a good idea and if you want to have more information about git, you can look it up in the mentioned endpoint. And this PR also added the branch name to the startup log.

TheZoker avatar Aug 25 '22 11:08 TheZoker

Thanks for the suggestion. I moved the git commit id into a tooltip: image

It is now displayed for both dev and prod systems

TheZoker avatar Aug 31 '22 01:08 TheZoker

I would display the branch name immediately on dev and test systems. The commit id should be shown in a tooltip on such systems.

On production systems, we should not show the commit as tooltip!

Instead, I suggest to show the branch and commit id in the bottom of the about page.

krusche avatar Aug 31 '22 19:08 krusche

@krusche Where should be branch name be displayed for the dev and test system?

TheZoker avatar Sep 01 '22 17:09 TheZoker

I would display it directly right to the version number

krusche avatar Sep 01 '22 18:09 krusche

The branch name in the navbar (I moved it below the version number, since the branch name could be longer and then clashes with the right menu): image

On mobile devices and on production system, the branch name will be hidden.

And the about page: image

TheZoker avatar Sep 02 '22 13:09 TheZoker

There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions.

github-actions[bot] avatar Sep 19 '22 12:09 github-actions[bot]

Well, yes, this is messing up the breakpoints; if you're adding stuff to the navbar that consumes width, the calculation for the breakpoints needs to be adjusted here.

At best, I could hover over the version and a tooltip would show me commit id and branch name.

This would probably be the simplest solution for that problem

https://user-images.githubusercontent.com/23171488/192281821-38cf5bfd-f56d-494f-a0bc-e239492dd69d.mov

bassner avatar Sep 26 '22 12:09 bassner

Thanks for the hint! The hover style was actually the first approach.

@krusche Should I revert it back to hover or do you want to display the information right away?

TheZoker avatar Sep 26 '22 20:09 TheZoker

Thanks for the hint! The hover style was actually the first approach.

@krusche Should I revert it back to hover or do you want to display the information right away?

If it is too complicated to show it in the navbar directly, then I suggest to add it to the bottom of the page (branch + git commit) above or below the following footer image

Of course, this should only be shown for dev and test environments

If you want to show it additionally when hovering over the version, this would be fine for me, but I'd like to see it quickly on dev and test environments without the need to move the mouse ;-)

krusche avatar Sep 26 '22 21:09 krusche

I would change Git Commit ID: a8482b6 to simply Git commit: a8482b6

krusche avatar Sep 26 '22 21:09 krusche

There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions.

github-actions[bot] avatar Oct 04 '22 12:10 github-actions[bot]