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 hide-disabled-milestone-sorter feature #1980

Merged
merged 9 commits into from Apr 29, 2019
Merged

Add hide-disabled-milestone-sorter feature #1980

merged 9 commits into from Apr 29, 2019

Conversation

kevin940726
Copy link
Contributor

@kevin940726 kevin940726 commented Apr 25, 2019

Closes #1918

Hide disabled milestone sorter

screenshot-before-and-after

  • Tested in chrome
  • Tested in firefox

Example: https://github.com/ForkIssues/TrackerWin/milestone/9

@fregante
Copy link
Member

fregante commented Apr 25, 2019

I think you can do this with CSS:

[aria-label="You do not have permission to edit this milestone."] {
  display: none !important;
}

This CSS still leaves an area that triggers the grab cursor though. Perhaps that's ok.

Alternatively, this CSS can be extended so:

  • only the icon is hidden
  • the span with the tooltip is extended to the whole grab area and it will still show the tooltip.

Essentially it will hide the icon without also hiding the reason why it can't be sorted.

@kevin940726
Copy link
Contributor Author

@bfred-it

I've thought about, but I didn't think that showing the cursor is acceptable. If it in fact is the preferred way then I'm happy to make the change!

@fregante
Copy link
Member

The cursor isn't ideal, but I'd personally rather have that instead of more JS

@kevin940726
Copy link
Contributor Author

@bfred-it
I just thought of a way to hack the cursor in my current implementation. I just have to assign a cursor: default to the <span> tag inside the grab area, then it should successfully cover all the area hence block the grab cursor from showing. Do you think it's a good idea?

@fregante
Copy link
Member

Yeah that works for me, if it's easy to reposition the SVG in there

@fregante
Copy link
Member

fregante commented Apr 25, 2019

#1983 is in, please merge from master and add it as a extra file ^_^

@fregante
Copy link
Member

The readme should probably link to #1918

@sindresorhus
Copy link
Member

I find it weird that the tooltip just shows up when hovering over nothing. It also looks weird that the issue icon/titled is left indented so much.

@kevin940726
Copy link
Contributor Author

@sindresorhus @bfred-it

My original implementation doesn't show the tooltip and the issue title is not indented. Should we revert back to it? Or is there any other alternative solution? Either way I'm here to help!

after

@fregante

This comment has been minimized.

@kevin940726

This comment has been minimized.

@sindresorhus
Copy link
Member

My original implementation doesn't show the tooltip and the issue title is not indented. Should we revert back to it?

👍

@fregante
Copy link
Member

fregante commented Apr 29, 2019

Sorry for the mess 😅

As a last change, I'd like to see a mockup like this in the readme:

I usually copy-paste that exact before/after style:

@kevin940726
Copy link
Contributor Author

@bfred-it Just updated the screenshot above. I'm not sure I followed here, do you mean to replace the issue link in readme.md to the image link? Or anything else?

@fregante
Copy link
Member

fregante commented Apr 29, 2019

Readme, instead of the link to the issue

readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
Co-Authored-By: kevin940726 <kevin830726@gmail.com>
@fregante fregante changed the title Hide milestone drag button when no permission Add hide-disabled-milestone-sorter feature Apr 29, 2019
@fregante fregante merged commit 52fcec3 into refined-github:master Apr 29, 2019
@fregante
Copy link
Member

fregante commented Apr 29, 2019

Thanks for this feature and sorry for all the "suggestions" 🎠

@kevin940726 kevin940726 deleted the feature/hide-no-permission-drag branch April 29, 2019 17:29
@fregante fregante mentioned this pull request May 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Hide milestone drag icon when no permission
3 participants