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

FIX #2544: Target name gets highlighted #3562

Closed
wants to merge 2 commits into from

Conversation

geetchoudhary
Copy link
Member

Fixes #2544

Short description of what this resolves:

In the sidebar when the user clicks on scrollable links the correct {{scroll-to}} gets highlighted.

Video:

mp4gifgif

Checklist

  • I have read the Contribution & Best practices Guide.
  • My branch is up-to-date with the Upstream development branch.
  • The acceptance, integration, unit tests and linter pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@geetchoudhary
Copy link
Member Author

@kushthedude , PTAL. Thanks 😄

@@ -3,12 +3,18 @@ import { computed } from '@ember/object';
import moment from 'moment';

export default Component.extend({
selectedIndex: undefined,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make it index?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do this but having

actions: {
    changeIndex(index) {
      this.set('Index', index);
    }
  }

will be very confusing for future issues, if any.

Copy link
Member

@snitin315 snitin315 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice Work @geetchoudhary

@abhinavk96
Copy link
Contributor

Stale, also we are approaching it the wrong way, maybe scroll to should be replaced with something that works, no point of using a library, and then manually writing an action, which the library was supposed to take itself.

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

Successfully merging this pull request may close these issues.

When scrolling to a target , The target name should get highlighted .
4 participants