Skip to main content
Answer

Widget Scroll Bar

  • April 11, 2024
  • 9 replies
  • 173 views

emily.mccarthy
Guide II
Forum|alt.badge.img+4

Hello! I am hoping some one can help me. At one point we added a scroll bar with a forced height to out Activity Stream widget on our home page. This has since stopped working. Does anyone have any advise on how I can modify the CCS to have it work again?

 

/* Added scroll bar for Activity Stream Widget on page*/

#doc-widget-31 {

    height: 450px;

    overflow:scroll

}

Best answer by dwilburn

@emily.mason - First I added the Activity Stream to my SuperAdmin page. I named the widget Activity Stream. Then I went to the API explorer.

Services = Pages

API Reference = Pages > Listing pages - here I pulled a list of pages and dumped that text into Notepad ++ and found the ID for my SuperAdmin page

API Reference = Pages > Get Single page information - here I put the ID for my page in and in that text it returned the It shows the ID of all of the widgets.

{
"id": "471",
"position": 19,
"type": "activitiesstream",
"name": {
"type": "single_value",
"value": "Activity Stream",
"values": []
},
"settings": {
"assignToAll": true,
"allowComments": true,
"allowAskTheExpertButton": true,
"showCourseAndLPActivity": true,
"translationsLocalizableFields": {
"title": {
"de": "Activity Stream",
"en": "Activity Stream",
"es": "Activity Stream",
"id": "Activity Stream",
"it": "Activity Stream",
"ja": "Activity Stream",
"ko": "Activity Stream",
"lt": "Activity Stream",
"lv": "Activity Stream",
"no": "Activity Stream",
"pl": "Activity Stream",
"ru": "Activity Stream",
"sv": "Activity Stream",
"uk": "Activity Stream",
"vi": "Activity Stream",
"zh": "Activity Stream",
"en-gb": "Activity Stream",
"fr-ca": "Activity Stream",
"es-419": "Activity Stream"
}
}
},

 

9 replies

dklinger
Hero III
Forum|alt.badge.img+11
  • Hero III
  • April 11, 2024

Hi - this is gonna sound silly coming from me. 

But from what you posted - the syntax for your css looks like it is missing a  }

Check if it is as simple as that???


emily.mccarthy
Guide II
Forum|alt.badge.img+4

@dklinger I just forgot to copy that in the post. I promise it is in the script. I also tried increasing the height as I thought maybe the widgets being populated were blocking it from working. Also no luck. I am trying to make sure it is being pulled to the correct widget but I am struggling. I am new to the CCS world! 


emily.mccarthy
Guide II
Forum|alt.badge.img+4

Following up on this. I guess the widget number changed. Wondering how often this may happen.


dwilburn
Guide III
Forum|alt.badge.img+4
  • Guide III
  • April 15, 2024

@emily.mason I’m curious, what kind of widget is it? Mine adds a scroll bar automatically if the height of the widget is higher than the widget height set in options.

I am also trying to see if I can tell anything in the developer tools of the browser. I have seen that used for these sorts of things before.


emily.mccarthy
Guide II
Forum|alt.badge.img+4

@emily.mason I’m curious, what kind of widget is it? Mine adds a scroll bar automatically if the height of the widget is higher than the widget height set in options.

I am also trying to see if I can tell anything in the developer tools of the browser. I have seen that used for these sorts of things before.

@dwilburn It was the Activity Stream widget. I did have a height set but the widget number changed from 31 to 117 for some reason and I didn’t catch that. I am not sure why that change occurred either.


dwilburn
Guide III
Forum|alt.badge.img+4
  • Guide III
  • April 15, 2024

@emily.mason - that is fair, I tried to limit that one in the past and it did not work. You would think that they would have it so that if you limited the height then it would have a scroll bar.


emily.mccarthy
Guide II
Forum|alt.badge.img+4

@dwilburn if you can identify the widget number, the above code did work and result in the scroll bar functioning on our home page. I highly recommend implementing it so users can benefit from seeing activity in your platform.


dwilburn
Guide III
Forum|alt.badge.img+4
  • Guide III
  • Answer
  • April 15, 2024

@emily.mason - First I added the Activity Stream to my SuperAdmin page. I named the widget Activity Stream. Then I went to the API explorer.

Services = Pages

API Reference = Pages > Listing pages - here I pulled a list of pages and dumped that text into Notepad ++ and found the ID for my SuperAdmin page

API Reference = Pages > Get Single page information - here I put the ID for my page in and in that text it returned the It shows the ID of all of the widgets.

{
"id": "471",
"position": 19,
"type": "activitiesstream",
"name": {
"type": "single_value",
"value": "Activity Stream",
"values": []
},
"settings": {
"assignToAll": true,
"allowComments": true,
"allowAskTheExpertButton": true,
"showCourseAndLPActivity": true,
"translationsLocalizableFields": {
"title": {
"de": "Activity Stream",
"en": "Activity Stream",
"es": "Activity Stream",
"id": "Activity Stream",
"it": "Activity Stream",
"ja": "Activity Stream",
"ko": "Activity Stream",
"lt": "Activity Stream",
"lv": "Activity Stream",
"no": "Activity Stream",
"pl": "Activity Stream",
"ru": "Activity Stream",
"sv": "Activity Stream",
"uk": "Activity Stream",
"vi": "Activity Stream",
"zh": "Activity Stream",
"en-gb": "Activity Stream",
"fr-ca": "Activity Stream",
"es-419": "Activity Stream"
}
}
},

 


emily.mccarthy
Guide II
Forum|alt.badge.img+4

@dwilburn Thank you for sharing this!