Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anchor links on http://redux.js.org do not work in Firefox #1982

Closed
kumar303 opened this issue Sep 23, 2016 · 9 comments
Closed

Anchor links on http://redux.js.org do not work in Firefox #1982

kumar303 opened this issue Sep 23, 2016 · 9 comments
Labels

Comments

@kumar303
Copy link

Do you want to request a feature or report a bug?

This is a bug report about http://redux.js.org/

What is the current behavior?

When I open a new tab in a browser and load http://redux.js.org/docs/basics/UsageWithReact.html#containersfilterlinkjs (or anything with an anchor), it behaves differently across browsers:

  • On Firefox 49, the URL changes to http://redux.js.org/docs/basics/UsageWithReact.html but it does not show the #containersfilterlinkjs section, titled containers/FilterLink.js
  • On Chrome 53.0.2785.116, the URL changes in the same way but I see the containers/FilterLink.js section

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar.

(see above)

What is the expected behavior?

  • It should show the linked anchor section in Firefox
  • The URL should retain the anchor so that I can easily copy and paste the link to share it with someone

Which versions of Redux, and which browser and OS are affected by this issue? Did this work in previous versions of Redux?

N/A

This is also broken in development versions of Firefox

@markerikson
Copy link
Contributor

@timdorr : see, I did say I was having issues with this (per #1891 )

@timdorr
Copy link
Member

timdorr commented Sep 23, 2016

Gah! Stupid plugin is stupid. Is there a better gitbook plugin for anchoring?

@timdorr timdorr added the docs label Sep 23, 2016
@gaearon
Copy link
Contributor

gaearon commented Sep 23, 2016

Would be cool to replace Gitbook with something that has better user experience.

@markerikson
Copy link
Contributor

I guess the main question is, what specific value and benefits does Gitbook bring to the table? Off the top of my head:

  • It parses and transforms Markdown
  • It sets up the TOC
  • It's got a built-in theme
  • It's written in JS

Beyond that... ?

There's certainly plenty of other static site generators out there. I just set up my own blog using Hugo, which is a single-binary Go app. There's SSGs written in Javascript, including Gatsby, which is written in React.

Then again, it'd be nice to know why Gitbook is acting screwy this way. Is there a relevant issue open?

Thoughts?

@timdorr
Copy link
Member

timdorr commented Sep 25, 2016

BTW, we have a neat new custom website for React Router 4.0: https://github.com/ReactTraining/react-router/tree/v4/website

There isn't the automatic ToC building, which is the one unique feature of Gitbook. But that's also a bit of magic and means you have to use a relatively opaque convention to your ToC document.

Could be a potential starting point if Gatsby doesn't rub you the right way.

@markerikson
Copy link
Contributor

@MoOx
Copy link

MoOx commented Sep 26, 2016

Maybe you might be interested by Phenomic, a modern static website generator based on React (and webpack) which offer you a way to iterate on pages data :)

@SamyPesse
Copy link
Contributor

Hi everybody!

First of all, we are taking a look at this exact bug to release a fix on GitBook ASAP.

@gaearon I understand that there is some frustration with the current GitBook UX. We are working hard on fixing it (both on GitBook, GitBook.com and the GitBook Editor).

But our goal is to transform GitBook into the perfect static generator / CMS for documentation. I believe it can become the right solution for projects like Redux.
We are starting to work more closely with open source projects to move GitBook in the right direction.

@markerikson Here is a list of what GitBook (and GitBook.com integrated with GitHub) can provide:

  • GitBook Toolchain
    • Easy to setup in a GitHub repository (GitBook only requires a book.json file)
    • Search (also possible to integrate Algolia)
    • We are working on better APIs for plugins
    • Clean design by default
    • Still readable on GitHub
    • PDF builds (Not useful for projects like Redux)
  • GitBook.com
    • Keep GitHub as the single source of truth
    • HTTPS and CDN
    • CI for keeping redux.js.org always up to date
    • Edition with our GitBook Editor

But more importantly, the next versions of GitBook will be able to fit your use case better, since it will offer a simple and robust API to help developers build additions to GitBook.

Anyways, whatever you decide to drop GitBook or not, I'd love to get your feedback and advices on what we are doing and what we can do better :)

@timdorr
Copy link
Member

timdorr commented Sep 28, 2016

OK, just rebuilt and this appears to work A-OK: http://redux.js.org/docs/recipes/reducers/UpdatingNormalizedData.html#other-approaches

Thanks for reaching out @SamyPesse and for the fixes. Please keep us in the loop as you have other changes coming down the pipeline. I'll probably look into the Algolia stuff pretty soon, as I'm a fan of their service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants