Skip to content

Fix clean-conversation-sidebar for triage access collaborator - #4245

Closed
yakov116 wants to merge 6 commits into
mainfrom
yakov116-patch-1
Closed

yakov116 wants to merge 6 commits into
mainfrom
yakov116-patch-1

Conversation

@yakov116

Copy link
Copy Markdown
Member

Fixes #4238

Test URLs

I tested on download-directory/download-directory.github.io#37

Screenshot

image

@yakov116 yakov116 added the bug label Apr 15, 2021
@yakov116

yakov116 commented Apr 15, 2021 •

Copy link
Copy Markdown
Member Author

Hmm this breaks other collaborator types Gotta test this later

@yakov116
yakov116 marked this pull request as draft April 15, 2021 17:38
@yakov116
yakov116 marked this pull request as ready for review April 16, 2021 13:01
@yakov116

Copy link
Copy Markdown
Member Author

OK from my finding, they have a unique DOM. Its a regular user with some added select dropdowns.

This reverts commit a50fdb1.
@fregante

fregante commented Apr 17, 2021 •

Copy link
Copy Markdown
Member

Full access

Screen Shot 1

Triage access

114912044-8a6ad800-9ded-11eb-8540-fdef5d868a88

I think the issue here is specifically because the “Assign yourself” button is missing from the Triager’s sidebar and therefore the “children count” is zero. Since the next condition selects this element, we can use that instead of this additional select. This also allows for a slight improvement of the whole if/else

@yakov116

yakov116 commented Apr 19, 2021 •

Copy link
Copy Markdown
Member Author

I lost you here, I am getting lost between this and that

@yakov116

Copy link
Copy Markdown
Member Author

I am going to close this as this feature needs a to be fixed anyways

@yakov116 yakov116 closed this Apr 20, 2021
@yakov116
yakov116 deleted the yakov116-patch-1 branch April 20, 2021 02:37
const assignees = select('.js-issue-assignees')!;
if (assignees.children.length === 0) {
// `#assignees-select-menu` check is for collaborators with only "triage access" #4238
if (assignees.children.length === 0 && !select('#assignees-select-menu')) {

@fregante fregante May 10, 2021 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What I meant in my previous comment is that #assignees-select-menu covers both cases, so assignees.children.length === 0 is a redundant check.

The same exact thing happened in #4336 (comment): A new selector/check was added instead of replacing the existing one. #4327 is the same, in a way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

clean-conversation-sidebar is broken

2 participants