Skip to content

Add hide-disabled-milestone-sorter feature - #1980

Merged
fregante merged 9 commits into
refined-github:masterfrom
kevin940726:feature/hide-no-permission-drag
Apr 29, 2019
Merged

fregante merged 9 commits into
refined-github:masterfrom
kevin940726:feature/hide-no-permission-drag

Conversation

@kevin940726

@kevin940726 kevin940726 commented Apr 25, 2019 •

Copy link
Copy Markdown
Contributor

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

fregante commented Apr 25, 2019 •

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
Member

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

@kevin940726

Copy link
Copy Markdown
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
Copy Markdown
Member

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

@fregante

fregante commented Apr 25, 2019 •

Copy link
Copy Markdown
Member

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

@fregante

Copy link
Copy Markdown
Member

The readme should probably link to #1918

@sindresorhus

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

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

👍

@fregante

fregante commented Apr 29, 2019 •

Copy link
Copy Markdown
Member

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
Copy Markdown
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

fregante commented Apr 29, 2019 •

Copy link
Copy Markdown
Member

Readme, instead of the link to the issue

Comment thread readme.md Resolved
Comment thread readme.md Resolved
Co-Authored-By: kevin940726 <[email protected]>
@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

fregante commented Apr 29, 2019 •

Copy link
Copy Markdown
Member

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