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

Add tag link handling with :tag:#tag syntax #3002

Merged
merged 7 commits into from
Feb 26, 2020

Conversation

AWolf81
Copy link
Contributor

@AWolf81 AWolf81 commented May 11, 2019

Description

I've added the tag links by using :tag:#tag link syntax.
It's working but not ready for merge because I'd like to wait for React upgrade because I'm using hashHistory directly. This will be changed later to dispatch(push(...))

Issue fixed

#1683

Type of changes

  • ⚪ Bug fix (Change that fixed an issue)
  • ⚪ Breaking change (Change that can cause existing functionality to change)
  • ⚪ Improvement (Change that improves the code. Maybe performance or development improvement)
  • 🔘 Feature (Change that adds new functionality)
  • ⚪ Documentation change (Change that modifies documentation. Maybe typo fixes)

Checklist:

  • 🔘 My code follows the project code style
  • ⚪ I have written test for my code and it has been tested
  • ⚪ All existing tests have been passed
  • 🔘 I have attached a screenshot/video to visualize my change if possible --> see issue

Note

The tag links are not handled in editor just in MarkdownPreview and I think we should open a new issue for this as I think the other link types (:line) are also not handled - or is line & tag handling only required in preview? I think they should be handled as there is a tooltip indicating how to click but the click is not working.

@AWolf81 AWolf81 marked this pull request as ready for review May 29, 2019 06:30
@ZeroX-DG ZeroX-DG added the awaiting review ❇️ Pull request is awaiting a review. label Jun 3, 2019
Copy link
Member

@ZeroX-DG ZeroX-DG left a comment

Choose a reason for hiding this comment

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

Very nice, this works very good for me. @AWolf81 can you resolve the conflict before I can approve it?

@ZeroX-DG ZeroX-DG added awaiting changes 🖊️ Pull request has been reviewed, but contributor needs to make changes. and removed awaiting review ❇️ Pull request is awaiting a review. labels Feb 12, 2020
@AWolf81
Copy link
Contributor Author

AWolf81 commented Feb 12, 2020

@ZeroX-DG sure, I've resolved the conflict and checked the feature.

I'll open an issue (if it's not already in the issues) for the Crtl+Link click that's not working for tag and line links as mentioned in my note above.

Update:
Travis CI fixed.
I've found the issue with linting in my editor. It was caused by my VS code setting. It used VS code standard format extension instead of eslint/prettier. (It added me a space before every paren)
My .vscode/settings.json looks like this (added formatOnSave and the eslint part)

{
  "editor.tabSize": 2,
  "search.exclude": {
    "**/node_modules": true
  },
  "typescript.validate.enable": false,
  "javascript.validate.enable": false,
  "[javascript]": {
    "editor.formatOnSave": true
  },
  "editor.codeActionsOnSave": {
    // For ESLint
    "source.fixAll.eslint": true,
  },
  "git.ignoreLimitWarning": true
}

@AWolf81 AWolf81 mentioned this pull request Feb 12, 2020
Copy link
Member

@ZeroX-DG ZeroX-DG left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

@ZeroX-DG ZeroX-DG added approved 👍 Pull request has been approved by sufficient reviewers. and removed awaiting changes 🖊️ Pull request has been reviewed, but contributor needs to make changes. labels Feb 19, 2020
@Rokt33r
Copy link
Member

Rokt33r commented Feb 24, 2020

@AWolf81 @ZeroX-DG I don't think we need to keep #. :tag:tag should be enough. How do you think?

@ZeroX-DG
Copy link
Member

That could be a good idea. Keep the consistency with other type of links like :note: or :line:. I'm OK with either way so @AWolf81 what do you think about this?

@Rokt33r Rokt33r added awaiting review ❇️ Pull request is awaiting a review. discussion 💬 Issue concerns a discussion. and removed approved 👍 Pull request has been approved by sufficient reviewers. labels Feb 24, 2020
@AWolf81
Copy link
Contributor Author

AWolf81 commented Feb 24, 2020

I would keep it with the hash as it's easier to remember and I think it would be confusing to users. As the tag is always displayed with the # in front.
The consistency would be better and it's an easy change - just removing the hash from the Regex.

Maybe if there would be a context menu to add tag links we could do it with-out #. But we should create an issue for this and discuss it there e.g. right click on tag shows Insert link to tag.

@Rokt33r
Copy link
Member

Rokt33r commented Feb 25, 2020

@AWolf81

I think prefixing :tag: is already enough to prevent the confusing. So yeah, I want to keep consistency so users can expect same behavior of other internal links. So please fix it. 🙏

Maybe if there would be a context menu to add tag links we could do it with-out #. But we should create an issue for this and discuss it there e.g. right click on tag shows Insert link to tag.

Sounds good to me but should be better to presented in a separated PR.

@AWolf81
Copy link
Contributor Author

AWolf81 commented Feb 25, 2020

@Rokt33r sure. I've fixed it. 👍

For the context menu I'll create an issue and start working on it later today.

Copy link
Member

@ZeroX-DG ZeroX-DG left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

@ZeroX-DG ZeroX-DG removed awaiting review ❇️ Pull request is awaiting a review. discussion 💬 Issue concerns a discussion. labels Feb 25, 2020
@ZeroX-DG ZeroX-DG added the approved 👍 Pull request has been approved by sufficient reviewers. label Feb 25, 2020
@Rokt33r Rokt33r merged commit 9f932a0 into BoostIO:master Feb 26, 2020
@Rokt33r Rokt33r added this to the v0.15.1 milestone Feb 26, 2020
@AWolf81 AWolf81 deleted the feature-tag-links branch February 26, 2020 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved 👍 Pull request has been approved by sufficient reviewers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants