foundation / foundation-sites

The most advanced responsive front-end framework in the world. Quickly create prototypes and production code for sites that work on any kind of device.
https://get.foundation
MIT License
29.64k stars 5.5k forks source link

[Magellan] data-offset KO // data-bar-offset OK #10994

Closed jbonlinea closed 6 years ago

jbonlinea commented 6 years ago

Hi,

This might not be the best example as I use foundation with grav and some inherited templated, however that's how I bump into it, and foud a solution on the forum.

Basically foundation documentation is not right

How to reproduce this bug:

  1. add data-offset="xx" to a navigation bar combining data-magelan and sticky

What should happen:

According to the doc, there should be an offset of xx pixels

What happened instead:

as if the option wasn't set

Browser(s) and Device(s) tested on:

firefox dev edition up to date, macbook pro 15"

Foundation Version(s) you are using:

6.2.4

solution

use data-bar-offset instead of data-offset ; it work's

DanielRuf commented 6 years ago

The docs are for the latest 6.x release which is 6.4.3

DanielRuf commented 6 years ago

https://github.com/zurb/foundation-sites/blob/v6.2.4/js/foundation.magellan.js https://github.com/zurb/foundation-sites/blob/v6.4.3/js/foundation.magellan.js

ncoden commented 6 years ago

Related to https://github.com/zurb/foundation-sites/issues/9512

jbonlinea commented 6 years ago

Hi, yes I had seen that the documentation was for 6.4.3, but how are we supposed to know that a given parameter name has changed !

I had seen that data-magelan was updated between 6.2.4 to 6.4.3, but we can't expect users to assume changes and check the code for every changes from version to version, especially since certain changes are mentionned in the documentation and some others aren't, for instance tooltip doc precises that absolute positioning is only usable with 6.4.3.

I totally advocate for multiple version documentation.

Good to see it's on it's way

Thank's for your answers !

DanielRuf commented 6 years ago

I had seen that data-magelan was updated between 6.2.4 to 6.4.3, but we can't expect users to assume changes and check the code for every changes from version to version, especially since certain changes are mentionned in the documentation and some others aren't, for instance tooltip doc precises that absolute positioning is only usable with 6.4.3.

In short, we currently have a changelog (which is currently the description of each release at https://github.com/zurb/foundation-sites/releases/ ) ;-)