-
Notifications
You must be signed in to change notification settings - Fork 172
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
Feature/integration GitHub project perspective + drafts - 2024 09 #275
Open
ensemblebd
wants to merge
13
commits into
clockify:master
Choose a base branch
from
ensemblebd:feature/integration-github-improved-2024-09
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature/integration GitHub project perspective + drafts - 2024 09 #275
ensemblebd
wants to merge
13
commits into
clockify:master
from
ensemblebd:feature/integration-github-improved-2024-09
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Warning: Requires at least one task/card to be linked to an issue, to procure the Repository name to feed into the Project value of the new clockify task. I do not see any other way to deduce it from the raw page content, nor localStorage of GitHub.com. Nor the url. Fallback is to use the Name of the Project. Note: This is not for the slideout, only the main card display of the Board. Also need to work on Table view too.
…o access data within github's ui via html.
For unknown reasons, the hidden internal dom property __reactProps will never exist unless chrome dev tools is open and you navigate to the DOM element, exposing the properties in the properties view. I do not know why, and this was already a major hack. I think it's time to look for a different approach. Committing code which I will soon delete, for posterity.
… Project name. So we'll fallback on the name of the Project. I've extrapolated the common logic, to try and scan against the existing known projects of clockify, using a substring match. And fallback further against any detected available issue link. It's the best we can do. Also implemented table handler in full, testing good.
…nt upon manual page refresh). when changing tabs, React is render cycling the entire document tree. However it would appear that two issues are present: a. webpack is transpiling the Class definition for our helper method into native, and it's already declared producing an error preventing execution. b. import() statements are not permitted because the transpiled "integration" is not an esm module. So it looks like I will have to rewrite my class helper into a const func, which degrades the async initializer/constructor approach. Ugh.
… the error. I think webpack esm -> native , s happy now. Tested good. Seeing fresh results whenever user switches tabs on github.
…table selector. Was caused by comparison of zero-based index with a value of 0 to equivalency of false.
… to support non-issue tasks. moving code order of ops, so we can reuse my helper class. And next commit will contain the actual fix.
Hello @ensemblebd. We are happy that you tried to contribute to our project by enhancing the integration for Github. After we review changes that you have made within our codebase, we'll give you feedback. All the best. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implemented clockify small-button for GitHub's Project-perspective:
Which by inference means it also now supports non-Issue tasks (GitHub's Project-pespective allows creation of tasks that are not tied to real GitHub Issues).
Also have code that enables pushing Labels from said tasks/issues, which works if Clockify already contains the associated Tag.
Let me know if any issues to help this PR along.
I believe my code on line 33 might be one area of improvement. Am using a hard internal to access the local storage of the extension, to procure the list of projects - for loose comparison to the Github Project view's Project-Name.
This is because on project view, there is no other reference to the Repository, anywhere.
And React internals (__reactRoot$*) are not possible to attain.
The only "volatile" change I believe is on line 125/126, which is now processed instead on line 115.
I don't believe it's possible that this negatively impacts backwards compatibility.
And additionally, it relies on the github html output to retain the class names for "test-id". I see no other way to reliably select the dom elements.
But humbly request your review to verify.
In short:
ScopedSingleton_GitHubProjectView
, for code-reusability purposes.h1
tag in the Project view. If present, it loosely matches against thelocalStorage
of the plugin's known projects.Appreciate your feedback.
My company just purchased Clockify, and we look forward to using it extensively within GitHub's Project-perspective.
But we need Clockify to work on non-issue tasks. Creating a GitHub issue for every task simply to project it into Clockify adds extreme clutter for us. And this solves that, and additionally gives users ability to initiate Clockify on GitHub Project-perspective views.
Thank you!
KanBan View
Table View
Initiation proof of concept, pulling both "repo" / "project" and Task title.