qpixel icon indicating copy to clipboard operation
qpixel copied to clipboard

Flagging as duplicate to "anonymous" link is possible (Like, flagging as duplicate of https://google.com/)

Open b-Istiak-s opened this issue 3 years ago • 5 comments

For closing a question as duplicate of another one, we don't allow to close a question to "anonymous" link. But, It doesn't apply to flagging. Like, I had seen duplicate post in Meta and, Math. Then, I could flag a post as duplicate of another community's question. I was thinking if we use the same condition for flagging either. User may not flag to "anonymous" link.

You may say user might describe (in details with link) why it's related. So, we shouldn't stop user from flagging as duplicate to "anonymous" link. My opinion is, If user add description than, we just can detect link and, check that post is available in that community or not. If not, than we could simply return an error to that user

b-Istiak-s avatar Sep 01 '21 08:09 b-Istiak-s

We should make "close as dupe" and "flag as dupe" use the same UI with the same error-handling. Right now flagging shows a textbox at the bottom, where you can enter anything, while closing shows the textbox right under the dupe reason, and you get a 400 error (no explanation) if you enter, say, google.com.

Eventually closing and dupe-handling will get an overhaul, but we're still designing that. In the meantime, is it feasible for them to use the same UI and input validation?

cellio avatar Sep 01 '21 23:09 cellio

It's not feasible for them to use the same UI, because they're different processes that get handled differently, so they have two completely separate UIs. We can change the validation for them - the only catch there is that flag validation is handled generically at the moment, so we'd have to add a specific exception for the dupe flag which isn't ideal.

ArtOfCode- avatar Sep 02 '21 11:09 ArtOfCode-

Ah, I see. I don't know if we want to invest in special-casing this code when (I hope) we're going to rework close/dupes anyway, so maybe we should just make sure the text in the dialogue is clear that we need a local URL and without that, the flag will probably be declined.

cellio avatar Sep 02 '21 14:09 cellio

will try to solve... https://github.com/codidact/qpixel/blob/develop/app/controllers/flags_controller.rb#L27-L40 leaving the comment to find the page easily..

b-Istiak-s avatar Oct 08 '21 06:10 b-Istiak-s

@Istiakshovon I don't think we need this one - we can rephrase the dialog text rather than adding extra special case code for this specifically.

ArtOfCode- avatar Oct 08 '21 15:10 ArtOfCode-