Git Product home page Git Product logo

adapt-quicknav's Issues

No longer working with contentObjects.json

It seems that the quick nav is no longer working when applied to content objects in contentObjects.json. Instead, it's required to create a new component to house the quick nav. In previous versions, adding to a content object worked fine.

Here is what I'm adding to a typical content object:

        "_quicknav": {
		    "_isEnabled": true,
		    "_isContinuous": "global",
		    "_injectIntoSelector": "",
	        "_global": {
		        "_pageNext":"co-300",
		        "_pagePrevious": "co-100"
		    }, 
		    "_buttons": {
		    	"_hasIcons": true,
		        "_root": {
		            "_isHidden": false,
		            "text": "Menu",
		            "_icon": "icon-home"
		        },
		        "_up": {
		            "_isHidden": true,
		            "text": "Back to menu",
		            "_icon": "icon-home"
		        },
		        "_previous": {
		            "_isHidden": false,
		            "text": "Previous Topic",
		            "_icon": "icon-controls-left"
		        },
		        "_next": {
		            "_isHidden": false,
		            "text": "Next Topic",
		            "_icon": "icon-controls-right"
		        }
		    }
		}

Note that I am not using an article reveal or a block slider.

Misaligned Tooltips

Subject of the issue/enhancement/features

The tooltips do not align with their corresponding button.

Your environment

  • Framework v4.3.0
  • Chrome 76.0.3809.100
  • OSX

Steps to reproduce

Run adapt create course in a new folder
git clone https://github.com/cgkineo/adapt-quicknav
Add quicknav json to components.json
Run grunt dev and grunt server
Hover over quicknav buttons

Expected behaviour

Tooltips should be aligned alongside their corresponding buttons.

Screenshots (if you can)

screen

Could be related to #70

new 'return to previous location' code generates errors when course has start page

If you use the new version of quicknav on the start page of a course, you get the following error in the console:

Adapt.findById() unable to find collection type for id: undefined

Which isn't surprising since you'd expect Adapt.location._previousId to be undefined on the start page.

Perhaps change getReturnToPreviousLocation to return Adapt.location._previousId ? Adapt.findById(Adapt.location._previousId) : null; ?

quicknav will navigate to unavailable content objects

it doesn't check a content object's _isAvailable property when calculating the next/previous item to navigate to, allowing the user to navigate to content objects that have been hidden from the course by things like the role selector

Doesn't show after a ABS or AR at end of page

If a Article Block Slider or Article Reveal is used at the bottom of the page QuickNav will not show below it.

Current workaround is having an empty article + block with a blank component below it. It would be better if this could just be avoided.

Feature request: to be able to implement locking on a start page

I think I'm right in saying that currently there's no way to implement any kind of locking of the quick nav buttons on the intro page of course that has the structure Intro page > Menu > Other pages...?

It would be extremely useful to be able to do this since you typically want to be quite hot about preventing the learner from getting past the intro page without having completed everything - as the intro page isn't typically shown on the menu (when there is a link back to it, there's generally no progress indicator). So if the learner does miss something they've got no way of knowing that what they missed was in the intro page.

(Yes you can put pageIncompletePrompt in - but the learner might ignore that and move forward anyway)

Here's my solution - which I'm not particularly happy with, it's just to get the conversation started!

Handlebars.registerHelper('shouldBeLocked', function(options) {
    if (this._isLocked) {
        return options.fn(this);
    }

    if (this._isDisabledUntilPageComplete && !Adapt.findById(this._isDisabledUntilPageComplete).get('_isComplete')) {
        return options.fn(this);
    }

    return options.inverse(this);
});

And here's the JSON:

"_buttons": {
    "_root": {
        "_isEnabled": true,
        "_isDisabledUntilPageComplete": "co-100",
        "_order": 1,
        "_classes": "btn-text",
        "_iconClass": "",
        "_alignIconRight": false,
        "text": "Continue",
        "ariaLabel": "Continue",
        "_showTooltip": false
    }
}

Tooltip position incorrect

When using the tooltips and a 3 button setup the tooltip for the first button is way too far to the right.
Safari/Chrome on Mac and Firefox on Windows using Quicknav 3.1 on AT 0.6.0 Framework 3.2

Also happens on Safari Mac using Quicknav 3.0.5 on AT 0.5.0 Framework 3.0

Remove old code

getAllDescendantModels has since been moved to the framework.

'variable @button-text-color is undefined' error when used with vanilla theme v5.0.0

Full details of error:

Fatal error: {
 "message": "variable @button-text-color is undefined",
 "type": "Name",
 "filename": "src/components/adapt-quicknav/less/quicknav.less",
 "index": 354,
 "line": 18,
 "column": 19,
 "callLine": null,
 "extract": [
  "        .icon {",
  "            color: @button-text-color;",
  "            display: inline-block;"
 ]
}

FW version is v5.1.0
Quicknav version: v4.0.0

Configuration

Now working great with the AT - It mentions being able to configure the buttons in the quick-nav though to be icons rather than text - can;t find any options in the AT interface - am I missing them?

Quicknav used in conjunction with the Article Reveal Extension

Hello,

If an article reveal is used at the bottom of a page, the quicknav extension will be placed inside of the article reveal. It is easy enough to create a new blank article after as a workaround so this ticket is just an idea really. Would it be possible to create an exception where quicknav is placed outside of an article reveal?

Tooltips in IE

When hovering over quicknav buttons in IE11, tooltips cause the page to intermittently show an extra vertical scrollbar making the page momentarily shift.

Accessibility updates

  • Add role="link" to navigation buttons
  • Add unlock listener
  • Add disabled on lock
  • Fix view events for header rendering in framework improvements

btn type selector should be dynamic

Quicknav button currently has the selector 'btn-text' regardless of whether the button has text or icon.

The btn type selector should be dynamic depending on whether text or icons are used in order to inherit the associated styling.

Use of Tooltips in Edge causes jumping/shifting

Added quickNav component. Configured it for previous, home, and next with icons. Enabled Tooltips ("_showTooltip": true).

When hovering over quickNav icon in Edge, a momentary shifting of elements is seen. On closer inspection, it appears to involve the inline style "top: 0px". In F12 devtools, uncheck "top: 0px" on the tooltip div and you'll see a secondary vertical scrollbar comes into view. Seems that the transition from "visibility: hidden" to "visibility: visible" is exposing the transition from "top: auto" to "top: 0px" and invoking a scrollbar during that period.

I was able to eliminate this behaviour by switching the rules from "visibility: hidden" to "display: none". Perhaps this has impact on some possible CSS transitions, but not for my current project.

framework 3.0
quicknav 3.0.5
edge 41.16299
Windows 10 Pro

aria-labels issues

the next/previous buttons are not able to reference the aria labels in _globals - should just need {{import_globals}} adding to the top of quicknav-item.hbs

additionally not sure that having complete/incomplete is that useful, in particular it seems a bit odd having the main menu button have 'Go to main menu. Incomplete' as the aria-label.

Accessibility - Must use tab to navigate through buttons

We have used the NVDA screen reader.

Normally with NVDA the user can press the down arrow to navigate through the content. However on QuickNav, when they reach the buttons, pressing down doesn't do anything. The user must press tab to navigate through the buttons. If they try to press the right arrow then NVDA starts to read out each individual character of the button. This is the case on Chrome, Firefox & IE11.

We would expect the user to be able to use the up/down arrows to navigate through the buttons.

QuickNav v3.0.0 FW v4.0.1

Course config and screenshot to follow.

unstable _order sorting

Subject of the issue/enhancement/features

In Chrome it looks like the sort which takes place on the _order of each item can cause issues with the expected order. Seems fine on other supported browsers.

Steps to reproduce

If more than 5 _siblings (actually linked to the data array containing more than 10 items) the index order of the siblings is not maintained during the sort.

Return to previous location button

It would be useful to include a button which returns the user to the last routed location, so we can use the quicknav for functionality such as navigating back from pages outside of the main content hierarchy, e.g. help pages.

adapt-quicknav not working with the contrib-vanilla theme

Using the latest version AT, when adding it to a course using the contrib-vanilla theme, it breaks preview with the dreaded "error occurred : contact admin"

output is :

error: [05 May 2017 13:19:49 -04:00] Error: Command failed: grunt server-build:d
ev --outputdir=courses\58f65fdabd661c0023b6c327\590cb2afd3312fac1132997a\build -
-theme=adapt-contrib-vanilla --menu=adapt-contrib-boxMenu

error: [05 May 2017 13:19:49 -04:00] Error: Command failed: grunt server-build:d
ev --outputdir=courses\58f65fdabd661c0023b6c327\590cb2afd3312fac1132997a\build -
-theme=adapt-contrib-vanilla --menu=adapt-contrib-boxMenu

In the animated GIF demo on this page it looks like the Harsh theme was used. adapt-quicknav seems to work with Harsh and other themes, but consistently breaks preview when switched back to adapt-contrib-vanilla theme. any ideas what's going on?

Lock can only be used on Next button

Can only apply a page complete lock on the next button, none of the other buttons are supported. You may wish to apply a lock to this other buttons if a sting page is used or if you want to force a user to remain within the page until it is complete.

Previous button not working on second page only

Hi,

Im sort of new to adapt but have worked quite a bit on it, two projects to be exact.

I tried copying and pasting working code from the other previous buttons and it still wont workon the second page only, the rest are fine.

Is this a common issue.

Thanks in advance for your assistance.

Buttons in wrong order using Chrome

Using 3 buttons: < Previous, Go to main menu, and Next > on Adapt Authoring 0.6.0, framework 3.2, Quicknav 3.1

When viewing in Chrome 69 Mac Sierra or on Chrome 67 or 69 on Windows 10 the Previous button is displayed last. They are ordered correctly in all other browsers.

Unable to preview when quicknav added

Having upgraded to latest AT and vanilla 3.0.0 theme, and using quicknav 3.0.5, just struggling to preview / view a published course once quicknav component has been added.

I get as far as the menu but can't open a page that includes quicknav (when set to one of its button options). Without quicknav (or when no quicknav settings are selected) the page opens fine. This took me a while to figure out as I'm only getting a loading symbol and no error message. Logs and browser console aren't giving much away either. It's happening on both new and pre-existing projects.

Any clues as to what this might be?

*** just got it working when I went back a couple of quicknav versions **

Not compatible with pages which are a parent of course

Looks like this crashes when a footer is assigned to a contentObject which is a parent of course. Not sure if we should always have a contentObject of _type:menu assigned to course rather than individual pages directly (if using multiple contentObjects), but if not, then it is possible to create issues with this.

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.