Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    #16
    Hi Isomorphic,

    just go to the sample (SNAPSHOT_v13.1d_2024-08-29), enable includeRangeCriteria by putting your line from #13 in the code, start the sample and switch to month view.

    Best regards
    Blama

    Comment


      #17
      Originally posted by Blama View Post
      just go to the sample (SNAPSHOT_v13.1d_2024-08-29), enable includeRangeCriteria by putting your line from #13 in the code, start the sample and switch to month view.
      I can confirm this, also in my application.

      Comment


        #18
        Originally posted by Isomorphic View Post
        Claudio - yes, the requests are still paginated, as requested - so you're going to see paging numbers. It's just paging withing the range of dates that were specified.
        Hello, I'm not sure I'm understanding. If in the selected view, for the visible range, there are 80 events, I'll see just 75 of them? I can imagine that, in the day and week views, scrolling could trigger a fetch, but I see startRow and endRow even in the month view without scrolling :confused:

        Comment


          #19
          Thanks guys - we'll revisit this functionality, the range values and the fetch-size issue, and get things working more cleanly for tomorrow's builds. We'll update when the updates land.

          Comment


            #20
            Thanks for the update.

            After thinking about it, I can imagine use cases (quite different from mine) where you might have a large number of events. I'm not sure what the desired behavior would be in that scenario, but if I try to create 1000 events in the sample above:

            Code:
            var now = new Date().getTime();
            var eventData = [];
            for (var i = 0; i < 1000; i++) {
                eventData.add({
                    eventId: i, name: "event " + i, description: "event description " + i,
                    startDate: new Date(now + i * 1000 * 60 * 35),
                    endDate: new Date(30 * 60 * 1000 + now + i * 1000 * 60 * 35)
                })
            }
            I immediately notice two fetches: one for the 0-75 range and another for the 75-1000 range (*). Even though there are just a little over 80 events displayed in the current week, and to see the others, you have to switch to month view and then navigate to September.

            (*) By the way, in the raw response tab for the 75-1000 request, I see [N/A]. Is this a new setting that prevents large responses from loading, or is there an issue with the developer console?

            Comment


              #21
              hi guys,

              Blama - thanks, we've fixed so that the rangeCriteria dates are both datetimes where expected and that should address the example you described

              Claudio - thanks for the followup - we're considering whether we need/the best way to deal with real-paging (of large result-sets returned as a result of rangeCriteria) and will update here in the coming days. We'll also get to the bottom of why the secondary automatic fetch you described was apparently not limited by the rangeCriteria.

              Comment


                #22
                hi Claudio,

                We've addressed the fetch issues - databound Calendar's basically require all the event-records for the current filter to be client-side at render-time - we don't create or render all the event canvases up-front, of course (we do that as you scroll around) but we do need the data to be available to facilitate features like overlapping/space-sharing.

                This means that Calendar should always have been using dataFetchMode: "basic", but wasn't setting a value in code, so was defaulting to "paged". We've made that change so you'll no longer see start/endRow numbers or multiple fetches.

                We've also made the rangeCriteria official and switched it on by default - new public doc for Calendar.includeRangeCriteria, default true (it's on CalendarView as well, but still undoc'd there for the moment).

                Finally, on the [N/A] in the Raw Response tab - we'll take a look and get back to you.

                Comment


                  #23
                  SmartClient Version: SNAPSHOT_v13.1d_2024-09-02/Enterprise Deployment (built 2024-09-02)

                  Hello, while I'm testing it, a question comes to mind: could the Calendar also support refreshData() and/or invalidateCache() methods?

                  Comment


                    #24
                    FYI I've already tried calendar.data.invalidateCache() and has no effect.

                    otherwise, my tests are positive so far (there's only that [N/A] in the Raw Response tab which I don't think it's related to the Calendar)

                    Comment


                      #25
                      hi Claudio - we agree there should be standard support for invalidating and refreshing Calendar data. We'll be reviewing the current API and will let you know when we've made something public.

                      The [N/A] content in the Raw Response tab is indeed not Calendar-specific - we'll update here once it's been addressed.

                      Comment


                        #26
                        Hi Isomorphic,

                        using SNAPSHOT_v13.1d_2024-09-06 I can see that the fetch is now using DateTime for startDate and endDate.

                        But if you add an event, it's still a Date for startDate and a DateTime for endDate if you quick-add an event by "Click date" -> "Enter Name" -> "Click save".
                        I'd expect a DateTime for startDate here as well. And it is a DateTime for both, if you click "Edit details" and then "Save".
                        So only the "small" editor creates Dates instead of DateTimes for startDate.

                        Best regards
                        Blama

                        Comment


                          #27
                          Hi Isomorphic,

                          I noticed that the fetches in Month view are always 6 weeks, even if you only display 5 weeks, like in June 2021. A 6 weeks-fetch make sense for e.g. May 2021.
                          Not really a problem, but perhaps something you want to optimize.

                          Best regards
                          Blama

                          Comment


                            #28
                            hi Claudio - no news on the "[N/A]" issue as yet, but we've improved Calendar.invalidateCache() and refreshData() so that both should now refresh the selected view fully, including re-fetching the data in its current range.

                            hi Blama - thanks for the reports - we're taking a look and will update shortly

                            Comment


                              #29
                              hi Blama - we've fixed both of the issues you mentioned.

                              New events in monthView will now have datetime start and end dates as expected and, for the range of the monthView, you were actually seeing a fixed 40-day range, applied by logic that had been in place for many years.

                              Please retest with tomorrow's builds, dated September 9, or a later one.

                              Comment


                                #30
                                SmartClient Version: SNAPSHOT_v13.1d_2024-09-10/AllModules Development Only (built 2024-09-10)

                                Hello, the refreshData/invalidateCache methods seems to work only for day/week views, I don't see fetches to occur when in the month view.
                                You can test it in the showcase (databoundCalendar sample):

                                Code:
                                // using a client-only dataSource so that test data is always relative to the current date
                                isc.DataSource.create({
                                    ID: "eventDS",
                                    fields: [
                                        {name: "eventId", primaryKey: true, type: "sequence"},
                                        {name: "name"},
                                        {name: "description"},
                                        {name: "startDate", type: "datetime"},
                                        {name: "endDate", type: "datetime"}
                                    ],
                                    clientOnly: true,
                                    testData: eventData
                                
                                });
                                isc.IButton.create({
                                    ID: "refreshButton",
                                    snapTo: "T",
                                    title: "Refresh",
                                    click: "eventCalendar.refreshData()"
                                })
                                isc.Calendar.create({
                                    ID: "eventCalendar",
                                    children: [refreshButton],
                                    startDate: eventData.getDataStartDate(),
                                    dataSource: eventDS, autoFetchData: true
                                });
                                refreshButton.bringToFront()

                                Comment

                                Working...
                                X