Skip to content

Conversation

@caddoo
Copy link
Owner

@caddoo caddoo commented Apr 13, 2023

Created a new plugin and a widget for displaying the website time and/or the locale time.

When timezones are the same:
image

When they are different:
image

I ran out of time for tests, if I had more time I would test the following:

  • An integration test for the WebsiteAndLocalTime.render() method, an integration test due to static calls to other classes that I can't mock. The test would make sure the correct timezone is returned.
  • A unit test for the new vue component, to test to make sure it updates every 1 second, make sure the view changes depending on if the timezones are the same.

To Fix:

  • The comparison for timezones is based on names, which as a result means sometimes the timezone name is different but the actual time is the same meaning we show the same time twice.

With more time I would change to pass around the UTC offset and compare that value instead.

Also I would take more time to learn about the design system to make the content of the widget look nicer, for now I just focussed on it looking good enough.

caddoo pushed a commit that referenced this pull request Aug 7, 2025
…omo-org#21926)

* [Coding Style] Enable rules PSR2.Methods.FunctionCallSignature.*

* Apply coding style around FunctionCallSignature #1 (matomo-org#21927)

* Apply coding style around FunctionCallSignature #2 (matomo-org#21928)

* Apply coding style around FunctionCallSignature #3 (matomo-org#21929)

* Apply coding style around FunctionCallSignature #4 (matomo-org#21930)

* Apply coding style around FunctionCallSignature #5 (matomo-org#21931)

* Apply coding style around FunctionCallSignature matomo-org#6 (matomo-org#21932)

* Apply coding style around FunctionCallSignature matomo-org#7 (matomo-org#21933)

* Apply coding style around FunctionCallSignature matomo-org#8 (matomo-org#21934)

* Apply coding style around FunctionCallSignature matomo-org#9 (matomo-org#21935)
@github-actions
Copy link

github-actions bot commented Aug 8, 2025

This PR was last updated more than one month ago, maybe it's time to close it. Please check if there is anything we still can do or close this PR. ping @matomo-org/core-reviewers

@github-actions
Copy link

If you don't want this PR to be closed automatically in 28 days then you need to assign the label 'Do not close'.

@github-actions
Copy link

github-actions bot commented Sep 8, 2025

If you don't want this PR to be closed automatically in 28 days then you need to assign the label 'Do not close'.

@github-actions github-actions bot added the Stale label Sep 8, 2025
@github-actions
Copy link

This PR was last updated more than one month ago, maybe it's time to close it. Please check if there is anything we still can do or close this PR. ping @matomo-org/core-reviewers

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

If you don't want this PR to be closed automatically in 28 days then you need to assign the label 'Do not close'.

@github-actions github-actions bot added the Stale label Nov 4, 2025
@github-actions
Copy link

This PR was last updated more than one month ago, maybe it's time to close it. Please check if there is anything we still can do or close this PR. ping @matomo-org/core-reviewers

@github-actions
Copy link

If you don't want this PR to be closed automatically in 28 days then you need to assign the label 'Do not close'.

@github-actions github-actions bot added the Stale label Dec 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants