Resolve "Time displayed in hover of environment deployments."
What does this MR do?
This MR addresses an inconsistency mentioned in #58475 (moved): time in the tooltip on the deployment page are in a different time zone then time in a tooltip on the pipeline page.
In addition to getting rid of this inconsistency, by changing the way time shows up in the deployment page, this MR presents:
- a refactoring of a helper method,
time_ago_with_tooltip
into a new class - rspec tests for this new class.
I noticed that time_ago_with_tooltip
was used in multiple place in the code base. Since the scope of this issue is limited to two pages, the new behavior for time display on the deployment page is driven by a new parameter, timezoned
. Having control on this new behavior and the fact that I was adding yet another parameter to that helper method were my motivations for refactoring.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Performance and testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Closes #58475 (moved)