Coder Social home page Coder Social logo

cgkineo / adapt-articleblockslider Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 16.0 637 KB

A simple left and right slider for an article's blocks (⛔️ Deprecated)

License: GNU General Public License v3.0

JavaScript 76.78% Less 10.10% Handlebars 13.11%
archived deprecated obsolete

adapt-articleblockslider's People

Contributors

chris-steele avatar gorhgorh avatar guywillis avatar kirsty-hames avatar moloko avatar oliverfoster avatar stuartnicholls avatar tomgreenfield avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adapt-articleblockslider's Issues

Add selectable "dots" to show how many blocks there are and to navigate

It would be great if this displayed dots at the bottom to indicate how many blocks there are and highlight the one the user is on. This would give the user a better understanding of how many blocks there are in total. I am thinking similar to how the narrative component includes these type of dots.

Simplify extension

  • Re-write to be backward compatible with pre ES6 but to be less complicated.
  • Move animations into CSS - use covermenu as a foundation.
  • Use proper prototype modification to do Article extensions.
  • Improve accessibility as currently broken.

Drop down options

Drop down menus within components--for example matching question answer options--do not open when using article Block Slider. Is there a solution for this or is there a particular setting that would allow functionality? Thanks!

Adding to existing course

If the ABS plugin is added to an existing course, when trying to edit a block the screen is blank. However if a new course is created with the ABS plugin everything works fine.

rtl in Firefox, Safari: current block not displayed

rtl ('dir-rtl') works fine in Chrome, but not in Firefox and Safari. In these (others not tested) the current block is not displayed. It is not improperly styled as 'visibility=hidden'. It is because the current block is not scrolled into view. Apparently there is a dispute among browsers about how rtl should be interpreted and this impacts what scrollLeft returns: positive vs negative numbers.

scrolling issue when media component used in ABS

if you include a media component in ABS and the user initiates playback then attempts to navigate to another block in ABS, you can get an issue with ABS trying to scroll back to the media component, leaving you with what looks like no content in the ABS (it's actually just hidden).

Caused by ABS attempting to a11y_focus the block, need to change it so that it only does so if user has activated accessibility

Get the number of the block

hi, I wanna know the number of the current block in another extension. I do that method:
_getCurrentBlock: function(){
var a = this.model.get("_currentBlock");
return a;
}

but when i call this method form outside, I recive the entire block, and I only want a number, it is possible?

Thank you for all

Required in properties.schema that shouldn't be

When using this with the new AT0.2.0 and FW2.0.11 there is a Required property of Minimum Height which is causing articles not to save if you are not using block slider in that article.

I'm not sure if you can just change Required-true to Required-false without causing issues when you do actually want to use it?

Remove left arrow on block 1 and right arrow on last block

It would be more elegant to remove the left arrow when you are on the first block and remove right arrow when on the last block as the disabled state is not ideal - the arrow has a rollover state when disabled. Having the option to disable or hide would be even better.

Always wants a minimum height

Whenever you change other settings it always wants a min height in the Authroing tool even if you are not using it on that article. Can it be set to 0 by default or maybe optional?

Blocks wrapping beneath each other

ABS version 3.1.1
FW version 5.17.1
On a few occasions I've had clients coming back to me to say the 2nd block of an ABS isn't displaying. The 2nd block is wrapping under the first (thus disappearing completely), rather than being displayed to the right. The effect can be replicated by changing .abs .block {float: none;} (as opposed to 'left'). Tried to force float left by adding !important but still no joy.

Occurs in varying browsers and devices. Today I've had this issue reported where the client is running the same (most recent) version of Chrome that I am - it doesn't break for me, but it does for her.

If it helps, I have a 5.15.2 FW course running ABS 3.1.1 that has been tested widely with no reported issues.

Breaking in FW 5.14.0

Appreciate this extension is a work in progress but for the record, FW 5 version of it worked great in 5.6.1. I jumped to FW 5.14.0 and it breaks.

In my console I'm getting 2 errors:

Uncaught TypeError: firstQuestionBlock is undefined in adapt.min.js

and

Source map error: Error: request failed with status 404
Resource URL: http://localhost:9001/libraries/regenerator-runtime.min.js

Error

Hello

When this plugin is added I keep getting the following error, the course previews fine without the plugin added to the course:

Command failed: grunt server-build:prod --outputdir=courses/5f6c6871010e4a0306ac5270/5f6c86cf5f46340277f0c487/build --theme=5f6c697a010e4a0306ac528b --menu=adapt-contrib-boxMenu

Fatal error: {
"message": "variable @block-padding-top is undefined",
"type": "Name",
"filename": "src/extensions/adapt-articleBlockSlider/less/articleBlockSlider-article.less",
"index": 172,
"line": 6,
"column": 12,
"callLine": null,
"extract": [
"\t\t\tmax-width: @device-width-large;",
"\t\t\tpadding: @block-padding-top 0 @block-padding-bottom;",
"\t\t\t// reduce padding as screen width decreases"
]
}�

Navigation buttons fly in from bottom

When the learners loads the page they see the nav buttons animate in from the bottom. Would be better to just disable animations until the page has fully loaded.

b8ey2vjprk

when using tabs, it's possible to get a big gap between the tabs and the block content

as you can see here:
abs_tabs-bug-rendered

having done a bit of digging, it seems the height of .article-block-toolbar isn't being calculated correctly in _blockSliderPostRender.

with the debugger on, it's easy to see why:
abs_tabs-bug-rendering

Could be fixed either by checking the height of all the buttons to see which is tallest - or by making the call to _blockSliderSetButtonLayout before doing any height checking - the latter seems easiest since the height of the buttons changes after the call to _blockSliderSetButtonLayout, changing when that is called is definitely the way forward!

scroll to top if clicking on a accordion on mobile when articleBlockSlider is enabled

if i install and enable this extension and have an accordion on my page, on mobile, as expected the articleBlockSlider does not activate, still if i click on an accordion item, the page scroll to the top.

If i change the "_startIndex": 0 to another value, it jumps lower than the top.

_blockSliderScrollToCurrent report the right sizes on mobile and desktop, but it does not seems to be disabled on the other sizes.

i made a simple test repo here
https://github.com/gorhgorh/articleBlockSlider-test

Adapt version : latest (2.0.8)
device : iphone 4 latest ios / android : chrome latest

Locking?

Is there a way to lock each block in the block slider, so that you cannot progress without completion of the components in the preceding blocks?

Trickle doesn't seem to work with this.

Extra tab on article trickle

When trickle is set at the article level, an extra empty tab is displayed requiring the user to click the tab and then the trickle button to move on. The trickle button should show up on the last block and then allow the user to move on.

Article Block Slider - Solution to getting it work with Authoring Tool

I made a properties.schema for anyone that wants to get the Article Block Slider working with version 2.0 on the Authoring Tool...

//proerties.schema FILE

{
  "type":"object",
  "$schema": "http://json-schema.org/draft-04/schema",
  "id": "http://jsonschema.net",
  "required":false,
  "properties":{
    "pluginLocations": {
      "type":"object",
      "required":true,
      "properties":{
        "config": {
          "type":"object"
        },
        "course": {
          "type":"object"
        },
        "contentobject": {
          "type":"object"
        },
        "article": {
          "type":"object",
          "properties":{
            "_articleBlockSlider": {
              "type":"object",
              "required":false,
              "legend": "BlockSlider",
              "properties":{
                "_isEnabled": {
                  "type":"boolean",
                  "required":true,
                  "title": "Enabled",
                  "inputType": { "type": "Boolean", "options": [false, true]},
                  "validators": [],
                  "help": "Turns Article Block Slider on and off. Acceptable values are true and false."
                },
                "_slideAnimationDuration": {
                  "type":"number",
                  "required":true,
                  "default":"600",
                  "title": "Slide Animation Duration",
                  "inputType":"Number",
                  "validators": ["required", "number"],
                  "help": "Sets the slide duration, in milliseconds, of the animation between blocks."
                },
                "_heightAnimationDuration": {
                  "type":"number",
                  "required":true,
                  "default":"300",
                  "title": "Height Animation Duration",
                  "inputType":"Number",
                  "validators": ["required", "number"],
                  "help": "Sets the duration, in milliseconds, of the animation between varying blocks heights."
                },
                "_isEnabledOnScreenSizes": {
                  "type": "string",
                  "required": true,
                  "default": "large",
                  "title": "Enabled On Screen Sizes",
                  "inputType": "Text",
                  "validators": [],
                  "help": "Defines which screen sizes the Article Block Slider displays the navigation elements on. Acceptable values are large, medium and small."
                },
                "_hasTabs": {
                  "type":"boolean",
                  "required":true,
                  "default": "false",
                  "title": "Has Tabs",
                  "inputType": { "type": "Boolean", "options": [false, true]},
                  "validators": [],
                  "help": "Turns the tab navigation on and off. If _hasTabs is set to true, you must set _hasArrows to false. Acceptable values are true and false."
                },
                "_hasArrows": {
                  "type":"boolean",
                  "required":true,
                  "default": "true",
                  "title": "Has Arrows",
                  "inputType": { "type": "Boolean", "options": [false, true]},
                  "validators": [],
                  "help": "Turns the arrow navigation on and off. If _hasArrows is set to true, you must set _hasTabs to false. Acceptable values are true and false."
                },
                "_startIndex": {
                  "type":"number",
                  "required":true,
                  "default": 0,
                  "title": "Start on what block",
                  "inputType": "Number",
                  "validators": ["required", "number"],
                  "help": "Sets which block displays on page load."
                },
                "_hasUniformHeight": {
                  "type":"boolean",
                  "required":true,
                  "default": "true",
                  "title": "Has a uniform height",
                  "inputType": { "type": "Boolean", "options": [false, true]},
                  "validators": [],
                  "help": "Sets all elements within the Article Block Slider to use the highest blocks height. Acceptable values are true and false."
                },
                "_minHeight": {
                  "type":"number",
                  "required":true,
                  "default": null,
                  "title": "Min Height",
                  "inputType": "Number",
                  "validators": ["required", "number"],
                  "help": "Sets a minimum height on the .article-block-slider container class."
                }
              }
            }
          }
        },
        "block": {
          "type":"object"
        },
        "component": {
          "type":"object"
        }
      }
    }
  }
}

Slider-trickle completion issue

Love this extension but just now experiencing an issue since upgrading my authoring tool. Where I have multiple blocks in a slider, all non-optional, the trickle Continue button consistently goes active on the 2nd last block viewed instead of the last. e.g. where there are 2 required blocks in an article, trickle enables on the 1st instead of 2nd; where there are 3 blocks, trickle enables on the 2nd block viewed instead of 3rd, etc.
Any ideas what might be the cause?
.. Just worked out that the issue occurs on full width components only. Where there's 2 components per block trickle responds fine. I was testing on the original Vanilla theme using Chrome.

_itemButtons navigation dots & a11y

In a course I'm working on the blocks in the ABS do not have titles assigned. As a result the aria-labels for the navigation dots are blank, causing the screen reader to read out "unlabelled x button".

Giving the blocks a title solves the aria-label, but with the default styling part of the title is rendered in each of the navigation dots.

Would it make sense to change the template to aria-label="{{displayTitle}}" to give flexibility for cases like this?

Enhancement : Back to the start button

I use this a lot for Step-by-step preocedures and it would be great to have the option somehow to "go to first block" once you reach the last block.

Any thoughts?

Require completion before advancing

We would like to have the option to prevent the learner from viewing blocks before they have completed the previous one. We tried to use Trickle and this seems have issues as posted adapt_framework/adapt-contrib-blockslider Issue #1689. Can we build this functionality in this component?

Trickle only listening for completion on last tab

I've got this working well in the arrows format but tabs is letting me 'cheat' by skipping to the last tab to enable trickle. I've made sure content in all tabs is non-optional and it still lets me skip ahead. Is there a simple fix for this one? I've been testing in the latest authoring tool with 2.0.3 version of the extension.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.