-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[Bug]: "copy the wikitext to the clipboard" produces different results depending on timing #5315
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
Comments
hello @nicolas-raoul, i am new to the project and exploring the project. Since it is a good-first-issue, can i give it a try? |
@Kshitiz-Mhto It is yours, thanks! Please let us know about your progress every few days. 🙂 |
@Kshitiz-Mhto Sure no worries, please focus on your exams, letting us know every 2 weeks is fine. :-) |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
my exam r over now, i m all good to go now, i will finish this as soon as i can. thank u! |
Any luck @Kshitiz-Mhto ? |
Hello! I'm new to the open source community and exploring the project. I saw this is a good first issue. Could I give it a try? |
Hello! I'm new to the Open Source Contribution |
@axelthepony27 It is yours, please let us know about your progress every week or so, thanks! 🙂 |
@nicolas-raoul Thanks! I forked the repo and cloned it to my locale, but the file |
@axelthepony27 And what happens when you try to compile? Do you get some error, or does it just work? For me, GitHub workflow seems to compile latest |
@mnalis When I try to build, I get this error. Perhaps I missed a step in the configuration? Is there something else I should do? I followed the steps described in the quick guide verbatim (at least to my knowledge). |
@axelthepony27 well, I don't really know (I don't even have local Android SDK installed - I just use GitHub to build it). But:
|
@mnalis Thanks! Indeed, the problem was solved by installing the correct SDK. I'll get to work on the issue now, it does appear to concern to the fragment of code that @Kshitiz-Mhto mentioned. |
Great finding! Ideally File: should be present even when copied during upload. The second line's syntax is the right one. |
Well, doing some tests, I determined the problem lies on the |
@axelthepony27 perhaps you can add the debug code around places where this gets called to get more precise idea when and where exactly the value changes? That should be instructional to finding the cause of the issue (and thus, the fix). |
@mnalis Thanks, I'll try that. I went on vacation for a couple of weeks, but I'll retake the issue this week |
Hi @nicolas-raoul , I just started to look for issues so that I can contribute, since it is a good first issue can i give it a try |
Hi, @nicolas-raoul @mnalis. Just following up on this, did you have the chance to check out my questions? |
@axelthepony27 I have too little experience with Commons codebase, so I can't give any specific pointers. If I did have more, I would've taken on the issue myself 😃 Regarding your dilemma in where to fix the code, I think it is way too premature way of thinking. That would be the kludge, and could be done anywhere alongside the path -- e.g. one could then simply check the description in any function before the description is shown to users, and prepend But that is not very good solution. It sometimes might be better than nothing (i.e. it fixes the immediate problem) but codebase maintainers might be unhappy about it (and with good reason: fixing the manifestations of bugs instead of bugs themselves might likely lead to even harder to fix bugs in the future and less readable/understandable codebase -- and even when kludge might be accepted, it should have big bug comment block explaining what is being done in dirty way, and why wasn't it done in better way). But to really solve the bug, one must:
Anyway, sorry for the length, but I tried to detail it in small and individually understandable pieces to make it easier for you to tackle the problem. Let me know if something is unclear and I can try to explain it better! (Hopefully the effort that went into it can be reused for other usecases, as bug hunting process is often quite similar) |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
@axelthepony27 feel free to ask to be re-assigned if you are still working on this. Thanks! :-) |
Hi 👋, I was trying to reproduce this issue, but on-going uploads does not show in the main screen anymore (just like shown in the issue description) instead they are in a separate screen (accessed from top bar). But, in that, the list item doesn't do anything on the click. I guess it was recently changed. Is it intentional to not show details or is this a I'm on latest Uploads screen doesn't show on-going upload.This is the uploads screenRecord_2024-10-09-22-31-02.mp4 |
Thanks a lot @parneet-guraya for checking this! Since there is no discrepancy anymore, this can be closed. If there is anything to improve in the remaining wikitext generation, please anyone create a new issub, thanks! 🙂 |
Not sure, if it is notified after being closed. Anyways, should we also implement showing details of an on-going upload on tapping on it? Thanks! |
I don't think there is any strong need for media details while uploading. At least not enough to justify the complexity. In particular, I don't think many people start adding wikicode for an image while it is still uploading. |
Makes sense 👍 |
Summary
Pressing the button
copy the wikitext to the clipboard
produces a different result depending if the upload is still in progress (wrong result), or whether the upload has finished (correct result).Steps to reproduce
copy the wikitext to the clipboard
button and paste the result somewherecopy the wikitext to the clipboard
button again and paste the result somewhereExpected behaviour
the first and second value copied are the same.
Actual behaviour
The first and second results differ. For example, for this file: https://commons.wikimedia.org/wiki/File:Knafel%C4%8Deva_markacija_na_odrezanoj_grani,_Prvi%C4%87.jpg the first copy/paste produces:
(which is wrong) while the second copy/paste produces (correct!):
i.e. the first one misses
File:
(which then makes problems when one pastes it to the app that expects standard commons format, like e.g. EveryDoor). Especially annoying when the mobile internet is slow, as one is forced to either wait a long time, or manually fix every image name.Device name
Huawei P30Pro
Android version
Android 10 (EMUI 12)
Commons app version
4.1.0 (latest f-droid)
Device logs
No response
Screen-shots
small_SVID_20230927_060146_1.mp4
Would you like to work on the issue?
None
The text was updated successfully, but these errors were encountered: