Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix migration from v-tooltip to native title in menu bar buttons ActionEntry #5233

Merged

Conversation

ShGKme
Copy link
Contributor

@ShGKme ShGKme commented Jan 11, 2024

πŸ“ Summary

Migration from v-tooltip to native title was not complete in <ActionSingle>

image

πŸ–ΌοΈ Screenshots
Before After
image image

Duplication of t definition

In some components translation method t was added as a computed property t: () => window.t or a method. But method t is already added globally by prototype monkey-patching: Vue.prototype.t = t.

It caused error. Removed as not needed.

image

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests
  • Documentation (README or documentation) has been updated or is not required

@ShGKme ShGKme force-pushed the fix/remove-non-exist-directive-and-duplicated-computed branch from 4a707d0 to 7292555 Compare January 11, 2024 11:23
@ShGKme ShGKme added the bug Something isn't working label Jan 11, 2024
@ShGKme ShGKme added this to the Nextcloud 29 milestone Jan 11, 2024
@ShGKme ShGKme changed the title Remove non exist directive and duplicated computed caused flood of errors in the console Fix tooltip after migration to title and remove duplicated computed caused flood of errors in the console Jan 11, 2024
@ShGKme

This comment was marked as outdated.

@nextcloud-command nextcloud-command force-pushed the fix/remove-non-exist-directive-and-duplicated-computed branch from 7292555 to 129456d Compare January 11, 2024 12:38
@juliushaertl
Copy link
Member

No need for comiting compiled assets here, for text we automated this after the merge.

Copy link
Member

@juliushaertl juliushaertl left a comment

Choose a reason for hiding this comment

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

Thanks for that ❀️

@ShGKme ShGKme force-pushed the fix/remove-non-exist-directive-and-duplicated-computed branch from 129456d to 9cfed18 Compare January 11, 2024 13:16
@ShGKme
Copy link
Contributor Author

ShGKme commented Jan 11, 2024

This seems to be a regression of #5174

So should also be backported

@ShGKme
Copy link
Contributor Author

ShGKme commented Jan 11, 2024

/backport to stable28

- Remove usage of already deleted directive v-tooltip
- Fixed native title text to be the same as was used in tooltip to show shortcuts on desktop

Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
@ShGKme ShGKme force-pushed the fix/remove-non-exist-directive-and-duplicated-computed branch from 9cfed18 to 0780eab Compare January 11, 2024 13:31
@ShGKme
Copy link
Contributor Author

ShGKme commented Jan 11, 2024

2 commits just squashed into one as they both actually fix migrating from v-tooltip to `title.

No changes in the code.

@ShGKme ShGKme changed the title Fix tooltip after migration to title and remove duplicated computed caused flood of errors in the console Fix migration from v-tooltip to native title in menu bar buttons ActionEntry Jan 11, 2024
@ShGKme ShGKme force-pushed the fix/remove-non-exist-directive-and-duplicated-computed branch from 0780eab to 592252e Compare January 11, 2024 15:25
It is already added to prototype. Having properties (e.g. computed) for this method in instances throws exception:

> The computed property "t" is already defined as a method.

Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
@ShGKme ShGKme force-pushed the fix/remove-non-exist-directive-and-duplicated-computed branch from 592252e to 82ddbac Compare January 12, 2024 04:48
@juliushaertl juliushaertl merged commit 3e2459e into main Jan 12, 2024
52 checks passed
@juliushaertl juliushaertl deleted the fix/remove-non-exist-directive-and-duplicated-computed branch January 12, 2024 04:56
@ShGKme
Copy link
Contributor Author

ShGKme commented Jan 12, 2024

Removing t from suggestions was a mistake. Suggestion lists are mounted as separated apps and don't reuse t from the text app init.

Returned it πŸ™ˆ

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.

None yet

2 participants