-
Notifications
You must be signed in to change notification settings - Fork 100
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
Add Dashboard widget #1641
Add Dashboard widget #1641
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1641 +/- ##
============================================
- Coverage 32.74% 31.94% -0.81%
- Complexity 25 35 +10
============================================
Files 55 58 +3
Lines 2782 2852 +70
Branches 532 537 +5
============================================
Hits 911 911
- Misses 1871 1941 +70 |
@jakobroehrl Thanks a lot. I will have a look in the evening. Also see #1641 (comment), maybe that helps debugging already. |
Can't add the dashboard module: $ npm install --save @nextcloud/vue-dashboard |
e5975d3
to
a482641
Compare
|
You can also stay back at @nextcloud/vue@^3 for now? |
No, Tasks needs nextcloud/vue@4, otherwise the material design icons stuff won't work. And probably other things wouldn't work either, I guess. |
Nice, how to do this? |
bb59d65
to
d7cf283
Compare
@jakobroehrl I got the Dashboard working with the current version of nextcloud-vue-dashboard. No need for an update of the lib. But please note that you need npm@7 to install the dependencies, since Tasks has recently updated to npm@7. The Tasks widget can be added properly to the dashboard now, but it doesn't do anything meaningful yet (and throws a lot of runtime errors on the console, because the code of |
d7cf283
to
adde730
Compare
@raimund-schluessler |
Check how the Calendar app generates the URL to open tasks in the Tasks app:
Yes, the raw string looks a bit unfinished. Best would be to show it similar to how the Calendar app shows dates in the Dashboard.
I don't know, need to check the code.
Yes. I would show tasks due next first, then important tasks. But that's up to discussion. |
4e5d667
to
17cd62e
Compare
The reason is that you select only the tasks from the first calendar, which happens to be the default list in your case: |
I fixed the url to the Tasks app and the due date formatting. What is left to do now is collected in #1641 (comment) |
6b4201f
to
d5c274c
Compare
This is good for review. It looks like this now: I packed a release for easier testing: Please have a look @nextcloud/designers |
For some reason this branch breaks the Calendar app dashboard widget. When I am on this branch, the Calendar widget throws
and no events are shown. @tcitworld @ChristophWurst Any idea why this interferes? |
Thanks for adding this widget @raimund-schluessler! The installation process goes fine, as expected. Issues
My task "write to osd...." contains 74 characters, double the length of "Test task with long name that overflows" shown above in your design. I'd expect to see the task list coloured dot shown properly, and the task title with elipsis as you have shown.
|
Thanks for the feedback. I saw that already, fixed it in e37f1f0 and uploaded a new release file in #1641 (comment). But you were faster than me and probably downloaded the previous file. Could you please check and download the file again. The squashed dot should look fine then. |
Heh, yes that's looking much better now. 👍 Might not be the right place to as but, is there a possibility to add functionality so users can add a task from the widget view? |
I also thought about this, but I am not sure, whether this is possible yet. I need to check if we could e.g. open a modal which would allow this. |
It seems to have something to do with the Javascript side. When I remove |
If the user presses "add task" loading the default calendar task list URL (in my case: www.my-nextcloud-url.com/apps/tasks/#/calendars/personal) with the Add a task to "Calendar" in focus automatically would be a good minimum. |
Maybe different ICAL.js versions set themselves in |
Hm, as far as i can tell Calendar and Tasks use the same version of ical.js. Both are at 1.4.0, see https://github.com/nextcloud/tasks/blob/enh/dashboard/package.json#L43 and https://github.com/nextcloud/calendar-js/blob/master/package.json#L48 I also tested latest master of Calendar, the same problem happens. |
It's this line which fails when the Tasks widget is present: And finally it fails here: |
@tcitworld @ChristophWurst I am really out of ideas here. |
I finally figured out why it is not working. You are right @tcitworld. The problem is I can get both Tasks and Calendar widgets working at the same time when I add So, to properly fix this issue, I think |
The only ICAL.js contributor still at Mozilla seems to be @kewisch so we can ask them if they still plan to maintain the project, otherwise ask for access or fork. |
There is basically no activity on the |
Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
015e003
to
d7a24b0
Compare
I now forked ical.js, see https://github.com/raimund-schluessler/ical.js and implemented a fix for the global ICAL variable leak, see https://github.com/raimund-schluessler/ical.js/pull/1 Once this is fixed upstream, we will move back to the upstream version of ical.js. Please check out the now working version of the Tasks dashboard widget: In case there are no objections, I will merge this soon. Further improvements will come with follow-up PRs. |
I hope this is the right place to give feedback for this. I've installed the tasks.tar.gz version mentioned above and it seems to work fine. root@3fe158b6-7c19-4d38-880c-5811175b868f:/app/code# occ app:list
I can:
So far things seems to be working. Thank you @raimund-schluessler for your dedicated work to get this fixed. ❤️ |
Fixes: #1243
Todo:
Known issues: