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

Move attribute element highlight code from link to typing #7546

Merged
merged 23 commits into from
Jul 21, 2020

Conversation

tomalec
Copy link
Contributor

@tomalec tomalec commented Jul 3, 2020

Make the code less link-specific, so it could be used for other attributes.

Suggested merge commit message (convention)

Other: Link's attribute element highlight is now a public utility.


Additional information

This is to address #7444 and #6722.

I do not like the redundancy in tests for highlighting. I copied the set of tests from linkediting to inlineHighlight. I wanted to remove part of them from linkEditing and just check some high-level behavior and that link uses inlineHighlight. Unfortunately, it's also not a perfect approach, see https://cksource.slack.com/archives/C03URJ97S/p1593637492006600

I'd leave it as it is, just to keep code coverage happy, and move on with the functional change.

Copy link
Contributor

@jodator jodator left a comment

Choose a reason for hiding this comment

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

The docs should have better wording - just details but might better understand the feature and should not mix view/model terminology.

Other than that I'm thinking about changing the API of findAttributeRange() as it's usage isn't that universal and always requires the same steps and code to be used which might be handled inside that function.

@tomalec
Copy link
Contributor Author

tomalec commented Jul 14, 2020

should not mix view/model terminology.

Correct me if I'm wrong, but I think this feature in general mixes the view and the model.

That said, I totally support making the docs clearer, but just probably lack the ideas how :)

BTW, I was trying to make simply move the code, and make minimal number of changes to its behavior (=> docs) to support multi-attribute 2SCM.

@tomalec
Copy link
Contributor Author

tomalec commented Jul 20, 2020

@jodator I think it's ready for another look.

@jodator
Copy link
Contributor

jodator commented Jul 20, 2020

@jodator I think it's ready for another look.

@tomalec could you take a look at merge conflicts?

@jodator
Copy link
Contributor

jodator commented Jul 20, 2020

@tomalec  Sorry, I've forgot to mention that some other PR was using findLinkRange()  - it got merged earlier.

@tomalec
Copy link
Contributor Author

tomalec commented Jul 21, 2020

@jodator Fixed, I hope it's fine now.

@jodator
Copy link
Contributor

jodator commented Jul 21, 2020

I've found one issue with the docs only. The rest comments were addressed 👍

@jodator jodator merged commit fc59dc4 into master Jul 21, 2020
@jodator jodator deleted the i/7444-2SCM-refactor-highlight branch July 21, 2020 13:44
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.

None yet

3 participants