Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: expose {time} to eventPost data, fix renamed tooltip #3698

Merged
merged 1 commit into from
Jan 17, 2023

Conversation

imorland
Copy link
Member

Fixes #0000

Changes proposed in this pull request:
DiscussionRenamedPost used the old style tooltip method, plus the tooltip was triggered by hovering anywhere on the text line. We now use the Tooltip component, and only on the discussion title itself.

Adds time to EventPost attrs, enabling the use of it in translations for event posts easily. See attached screenshots for core/bundled usages.

Reviewers should focus on:

Screenshot
Before:
image

After:
image

Updated translations using the time attr
image

Necessity

  • Has the problem that is being solved here been clearly explained?
  • If applicable, have various options for solving this problem been considered?
  • For core PRs, does this need to be in core, or could it be in an extension?
  • Are we willing to maintain this for years / potentially forever?

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test).
  • Core developer confirmed locally this works as intended.
  • Tests have been added, or are not appropriate here.

Required changes:

  • Related documentation PR: (Remove if irrelevant)
  • Related core extension PRs: (Remove if irrelevant)

@imorland imorland requested a review from a team as a code owner November 27, 2022 13:09
@imorland imorland changed the title feat: expose {time} to eventPost data, fix renamed tooltip feat & fix: expose {time} to eventPost data, fix renamed tooltip Nov 27, 2022
@SychO9 SychO9 changed the title feat & fix: expose {time} to eventPost data, fix renamed tooltip feat: expose {time} to eventPost data, fix renamed tooltip Nov 27, 2022
Copy link
Member

@askvortsov1 askvortsov1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if rel_time might be a better name; my first thought was that there's an "at" missing (e.g. x did y AT {time}), but that's not the case with humanTime

@SychO9 SychO9 added this to the 1.7 milestone Jan 17, 2023
@SychO9 SychO9 merged commit 03d2d7e into main Jan 17, 2023
@SychO9 SychO9 deleted the im/event-post branch January 17, 2023 19:47
@luceos luceos mentioned this pull request Mar 2, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants