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

Optimized, common selection algorithm for all navigation methods #175

Open
tedepstein opened this issue Aug 8, 2016 · 1 comment
Open

Comments

@tedepstein
Copy link
Collaborator

tedepstein commented Aug 8, 2016

Outline view, quick outline view and hyperlink navigation are all supported navigation methods in SwagEdit. There may eventually be others, such as view-to-editor navigation or positional sync with Swagger-UI, or with RepreZen's live Diagram and Documentation views.

We have discussed a couple of optimizations to the navigation algorithm from outline and quick outline. But these should be unified to a single, centralized selection behavior.

I would suggest the following rule:

  • If the target element constitutes the entire value of a property, select the entire line containing the property name.
  • If the target element is not the entire value of a property (e.g. it's a fragment file, a top-level object in a file, or an array element, select the first line of the target element value.
@tedepstein
Copy link
Collaborator Author

Mentioned by Saul here.

tedepstein referenced this issue Aug 24, 2016
quick outline item is selected

Previously navigation did not work because `length` was 0
tfesenko added a commit that referenced this issue Jan 12, 2017
#175 - Optimized, common selection algorithm for all navigation methods
tfesenko added a commit that referenced this issue Jan 12, 2017
#175 - fix tests broken by changing AbstractNode's position
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

No branches or pull requests

1 participant