fix: show the content of the dashboard widgets again - #212
Merged
Merged
Conversation
The widgets rendered nothing, for three reasons that only show up one after the other: - data() read OCA.Theming.color, which Nextcloud no longer provides, and the resulting TypeError stopped the component from rendering. The value was not used anywhere, and neither was darkThemeColor, so both are removed. - The empty content message and the connect button were in the #desc slot, which NcEmptyContent no longer has. They now use the description prop and the action slot. - /notifications answered 200 with an empty list for users without a Jira account, so the widget reported no notifications instead of asking to connect one. It now answers 400 in that case, which the widget already treats as not connected. Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both Jira dashboard widgets stay empty on every supported Nextcloud version, for three reasons that only show up one after the other.
The widgets no longer crash when loading
data()readOCA.Theming.color, which Nextcloud no longer provides (OCA.Themingis now the theming app's initial state, withprimaryColorinstead ofcolor), so.replace()threw aTypeErrorand nothing rendered under the widget title.themingColoranddarkThemeColor, which read the long goneOCA.Accessibility, were not used anywhere, so both are removed.The empty content message and the connect button are shown
The message and the Connect to Jira button were in a
#descslot, whichNcEmptyContentno longer has, so they were never rendered. They now use thedescriptionprop and theactionslot, the same way the Reddit widget does.Users without a Jira account are asked to connect one
GET /notificationsanswered 200 with an empty list when no Jira account is connected, so the widget said No Jira notifications! and hid the connect button. It now answers 400, which the widget already treats as not connected, when the user has neither an OAuth token for Jira Cloud nor basic auth credentials for a self-hosted Jira, the same check the search provider does.馃 AI (if applicable)