Announcement

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

    Calendar day and week views hover properties

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

    Hello, I just noticed that this settings on a Calendar:

    Code:
    weekViewProperties: {hoverWrap: false}
    dayViewProperties: {hoverWrap: false}
    don't seem to have an effect. You may test it in the showcase, databoundCalendar sample (a description like that of the "Inspection" event is pretty long):

    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.Calendar.create({
        ID: "eventCalendar",
        weekViewProperties: {hoverWrap: false},
        dayViewProperties: {hoverWrap: false},
        startDate: eventData.getDataStartDate(),
        dataSource: eventDS, autoFetchData: true
    });
    the result is unchanged:

    Click image for larger version

Name:	2024-09-03 16.06.08.jpg
Views:	32
Size:	12.9 KB
ID:	273468

    instead, monthViewProperties: {hoverWrap: false} seems to work, you may try to put a long name in some event, and the result will be:

    Click image for larger version

Name:	2024-09-03 16.07.57.jpg
Views:	27
Size:	7.9 KB
ID:	273469

    the problem seems to be with any hover-related property

    #2
    hi Claudio,

    In general, this approach of just not wrapping hovers is going to be more problematic than wrapping them, we suspect. Presumably, you DO still want the thing to show the whole content, so it would still have to wrap the edge of the component or Page at a minimum, right? Otherwise, you're going to end up with enormously wide, single-line hovers that always extend off-screen to the right.

    Can you confirm what you're looking for?
    Last edited by Isomorphic; 3 Sep 2024, 06:43.

    Comment


      #3
      Hello, yes, actually I started playing with hoverAutoFitWidth and hoverAutoFitMaxWidth as the doc suggests, something like:
      Code:
      {hoverAutoFitWidth: true, hoverAutoFitMaxWidth:400}
      but I didn't see an effect, so at first I thought that maybe I was using them in the wrong way so I opted to continue testing with the more "brutal" hoverWrap, but you're right that it's not what I'm looking for, I just want larger (but not fixed width) hovers as I've got some pretty long text.

      Comment


        #4
        Great, thanks - that sounds like a bug, we'll let you know when it's fixed

        Comment


          #5
          hi Claudio - where did you apply those settings? Did you try applying them to isc.EventCanvas?

          Comment


            #6
            Hello, nope, I tried with day/weekViewProperties

            Comment


              #7
              But it's the hovers on the eventCanvases that you want to change, right? Try applying it to Calendar.eventCanvasProperties

              Comment


                #8
                Oh, it actually works! I hadn’t thought of that, how dumb of me! Thanks for the tip!

                Comment


                  #9
                  The simplest solution is often the best!

                  But, we'll still consider propagating the hover-settings from the Calendar to its various children - there's no real reason you'd want to apply different sizing rules to a hover for an EventCanvas versus one for a header or the other stuff covered by showViewHovers. We'll update here and let you know if we add a convenience mechanism.

                  Comment


                    #10
                    hi Claudio - we've made things so that if you set hoverAutoFitWidth or hoverAutoFitMaxWidth on the Calendar itself, they'll propagate to the individual views and eventCanvases automatically. You can still override them via weekProperties/eventCanvasProperties, etc.

                    Please retest with today's build, dated September 8, or a later one.

                    Comment


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

                      I see it's working, thank you very much!

                      Comment

                      Working...
                      X