raphaelheinz / LeetHub-3.0

This plugin automatically pushes your code to GitHub when you pass all tests on a Leetcode problem.
MIT License
130 stars 84 forks source link

Still does not work on New version of Leetcode UI #5

Closed snowphone closed 11 months ago

snowphone commented 11 months ago

Please review previous closed issues before filling out a new one! Duplicate issues will be closed without comment.

Describe the bug I tried 0.0.1, 0.0.2, and 0.0.3 but all three versions cannot detect code submissions on newer UI. I'm not a frontend engineer so I can't tell which log is helpful and which one is not. If you specify the prodcedure to collect logs properly, I'll give you ASAP.

aystream commented 11 months ago

If you wait 2 hours, I will solve both with the problem #2 Just wait, it looks like the layout has changed a bit, that's why

aystream commented 11 months ago

@snowphone You can take the code from the commit, everything should work

raphaelheinz commented 11 months ago

Hopefully Leetcode does not continue changing its UI that often in the next future and breaking our plugin on a daily basis...

raphaelheinz commented 11 months ago

I merged the pull request and built a new software. Version v0.0.4 should be available in the Web Store soon. Please check then if its working @snowphone .

snowphone commented 11 months ago

Unfortunately, I tried with new UI after the extension is updated to 0.0.4 but still the problem exists.

image

raphaelheinz commented 11 months ago

Hmm, unfortunately I cannot reproduce this issue because v0.0.4 works for me as expected. I just tested. After installing from Web Store and reloading Leetcode website, the script is loaded correctly and my solutions are pushed to GitHub..

@snowphone Do you maybe still have LeetHubv2 installed in parallel? Maybe this explains some issues...

raphaelheinz commented 11 months ago

@snowphone If you are referring to the "easy", "medium" and "hard" counters: They are not synced with your previous submissions. The counters are set to 0 on installation and incremented on every correct problem submission. So it is expected for them to be 0 as in your case.

Does LeetHub v3 create commits in your GitHub repo?

snowphone commented 11 months ago

It seems we were not on the same page. For testing, I tried three different layouts: Legacy (always worked, even on V2, V1), New, and "Dynamic Layout". I was using "New" layout so far and after trying "Dynamic Layout", it works!

Legacy New Dynamic Layout
Click Submit Button Good Bad Good
Press Ctrl + Enter - Bad Bad
raphaelheinz commented 11 months ago

Thanks a lot for your check . Sorry I have not made it clear, I also tested on "Dynamic Layout" so far. Not sure what is the issue with "New Layout" though, we have to check that.

Good to hear you confirmed it works with "Dynamic Layout" :) I think it is a good basis so we can continue Leetcoding on a modern UI... 🥳

viCodexm commented 11 months ago

The extension only functions within a Dynamic Layout. However, it still does not work in Split Mode. image

raphaelheinz commented 11 months ago

I added a commit into development branch to remove this error. But the log doesn't have anything to do with the missing "split mode" layout support.

Currently, only "old layout" and "flexible layout" are supported. We have to add parsers for the "split mode" because the submission id is not shown in the URL.

But I am not sure when I will have time...if you are interested your pull requests are welcome :)

snowphone commented 11 months ago

I think since we're on the same page, it would be better to close this issue and create smaller issues on demand (support "new" layout, split mode, submission shortcut, and so on).