You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If iI did not miss anything, the Web-UI is currently read-only.
To be ablle to create bugs, comments, edit, remove and so on in a way that works for any kind of (non-technical) users, is very important for any project that might has such users.
An alternative solution coudl be, to make an alreayd existing GUI/WebUI to use git-bug as a backend, like suggeste for example in #80.
What are your thoughs about this, how hard would it be to implement it, what problems do you see?
That's correct, the web UI is only read only for now, just because no one took care of that yet. It's an important task, not only for local rich editing (images, files ...), but also to eventually create a public portal which will accept external users.
Note that most of the GraphQL mutations already exist, so that's almost purely an JS/web job.
I am not a web dev, and .. generally have little to no idea about the technologies you used in the web UI.
Can you recommend an IDE, editor, tutorial or something to get started?
There is plenty of tutorial floating around if you search for react graphql apollo. I don't have anything specific to recommend. But I'm not gonna lie, that's a lot to ingest.
As @MichaelMure mentioned, I created an add-bug screen. It seems to work but I think there is something I need to do in order to "update the apollo cache". I have no idea what that means but I read it in one of the tutorials I was following. The result is that the bug-list is out of date when you go back it it. I just hit refresh for now. I filed a bug to fix it 😉.
In any case, I'm just tinkering around so if someone else wants to dedicate some real time to this please don't think I've claimed it or anything. I doubt I'll have much time to dedicate to it but I'd love to dig in a little more if I can.
@hoijui I also am a complete n00b to react, graphql, and even JSX but I found it pretty easy to get started (I have some javascript experience though). The instructions at webui/Readme.md worked just fine and I just used a plain editor (vscode) to make my change. Feel free to take a look at my branch and diff it against the upstream to see how I implemented the feature.
Reacted by Amine, Michael Muré, hoijui and LenaNoctua
Hi @MichaelMure !
I read about GraphQL and I did the Apollo tutorial. I had no previous experience with GraphQL before.
I´m already able to create new bugs through the git-bug API using Insomnia (an app like Postman). See image below.
However, I´m having problems to execute the same GraphQL mutation command by React/Apollo. The code should be simple. I will print what I´m doing and I will be glad If You or any other collaborator can give me any hint, ok?
It was a little bit frustrating that a code generator make it work automagically adding just one file but...
c'est la vie.. 😃 Probably was something related to return object type conversion.
I will improve the Readme file with the lessons learned during this issue to give quick context for graphql begginer´s, like me.
Can You edit this issue title to "WebUI - Allow to create bugs"?
I would like to create a new issue specifically for edition as "WebUI - Allow to change a bug title". Today It is already possible to add comments for existing issues. 😉
@MichaelMure what considerations about permissions should I consider?
Who can create or edit a bug?
I found a component that checks if the user is logged in to decide if comments can be added or not. About what kind of login are We talking about? 🤔
At the moment, anyone can create and edit any bugs (including comments they are not the author of). This should change in the future once the identity system become smarter. For now, maybe it's best to match whatever is possible in git-bug core?
Regarding the authentication, there is three different scenario:
the user might might not have an identity yet (that is, Repository.userIdentitycan be nil in GraphQL). In that case we want to have a read-only UI if we don't have a user yet.
in the future, the webUI might be used for a public portal (possibly with external auth like github OAuth where identities would be imported in git-bug at first login). Again, we want a read-only view when we don't have a user logged in yet.
the webUI can be started with --read-only to force a read-only view.
Activity
hoijui commentedon May 30, 2019
Somewhat related comment in an older issue: #31 (comment)
MichaelMure commentedon May 30, 2019
That's correct, the web UI is only read only for now, just because no one took care of that yet. It's an important task, not only for local rich editing (images, files ...), but also to eventually create a public portal which will accept external users.
Note that most of the GraphQL mutations already exist, so that's almost purely an JS/web job.
hoijui commentedon May 30, 2019
I am not a web dev, and .. generally have little to no idea about the technologies you used in the web UI.
Can you recommend an IDE, editor, tutorial or something to get started?
MichaelMure commentedon May 30, 2019
There is plenty of tutorial floating around if you search for
react graphql apollo. I don't have anything specific to recommend. But I'm not gonna lie, that's a lot to ingest.MichaelMure commentedon Oct 24, 2019
@cheshirekow seems to be working on this ❤️ : https://github.com/cheshirekow/git-bug/tree/cheshirekow-webui
cheshirekow commentedon Oct 24, 2019
As @MichaelMure mentioned, I created an add-bug screen. It seems to work but I think there is something I need to do in order to "update the apollo cache". I have no idea what that means but I read it in one of the tutorials I was following. The result is that the bug-list is out of date when you go back it it. I just hit refresh for now. I filed a bug to fix it 😉.
In any case, I'm just tinkering around so if someone else wants to dedicate some real time to this please don't think I've claimed it or anything. I doubt I'll have much time to dedicate to it but I'd love to dig in a little more if I can.
@hoijui I also am a complete n00b to react, graphql, and even JSX but I found it pretty easy to get started (I have some javascript experience though). The instructions at webui/Readme.md worked just fine and I just used a plain editor (vscode) to make my change. Feel free to take a look at my branch and diff it against the upstream to see how I implemented the feature.
hoijui commentedon Oct 28, 2019
cool!
thank you @cheshirekow ! will do next time I get the courage for it.
MichaelMure commentedon Feb 12, 2020
This is actively worked on by @sandhose and @ludovicm67 🎉
claudioantonio commentedon Jan 13, 2021
Hi @MichaelMure , @cheshirekow and @hoijui .
Any news about this feature? I'm interested to help. ;-)
MichaelMure commentedon Jan 14, 2021
@claudioantonio no one is working on this at the moment, so feel free to take a stab at it! Much appreciated.
claudioantonio commentedon Jan 14, 2021
Ok @MichaelMure . I'll take a look at the work started by @cheshirekow .
claudioantonio commentedon Jan 14, 2021
@MichaelMure to start the backend is cygwin sufficient to exec the makefile?
3 remaining items
MichaelMure commentedon Jan 24, 2021
That's neat :)
claudioantonio commentedon Jan 28, 2021
Hi @MichaelMure !

I read about GraphQL and I did the Apollo tutorial. I had no previous experience with GraphQL before.
I´m already able to create new bugs through the git-bug API using Insomnia (an app like Postman). See image below.
However, I´m having problems to execute the same GraphQL mutation command by React/Apollo. The code should be simple. I will print what I´m doing and I will be glad If You or any other collaborator can give me any hint, ok?

MichaelMure commentedon Jan 28, 2021
Sure, but react is not really my area of expertise.
If that helps, git-bug also has a built-in GraphQL playground when you start the webui:
http://127.0.0.1:44159/playgroundclaudioantonio commentedon Jan 28, 2021
Hi @MichaelMure !
Wow! I liked the playground a lot. ;-)
Sorry for the lack of the error message in the last comment.

MichaelMure commentedon Jan 28, 2021
That looks like a HTTP error, maybe looking at the network debugger in your browser would help?
claudioantonio commentedon Jan 28, 2021
Problem solved @MichaelMure !
It was a little bit frustrating that a code generator make it work automagically adding just one file but...
c'est la vie.. 😃 Probably was something related to return object type conversion.
I will improve the Readme file with the lessons learned during this issue to give quick context for graphql begginer´s, like me.
Can You edit this issue title to "WebUI - Allow to create bugs"?
I would like to create a new issue specifically for edition as "WebUI - Allow to change a bug title". Today It is already possible to add comments for existing issues. 😉
[-]WebUI - allow to create bugs, edit, add comments, ...[/-][+]WebUI - allow to create bugs[/+]MichaelMure commentedon Jan 29, 2021
Done. Feel free to open more issues for the other parts (or straight up a PR :-D)
claudioantonio commentedon Jan 29, 2021
@MichaelMure what considerations about permissions should I consider?
Who can create or edit a bug?
I found a component that checks if the user is logged in to decide if comments can be added or not. About what kind of login are We talking about? 🤔
Merge pull request #538 from claudioantonio/webui_158
MichaelMure commentedon Feb 1, 2021
@claudioantonio sorry I missed that one.
At the moment, anyone can create and edit any bugs (including comments they are not the author of). This should change in the future once the identity system become smarter. For now, maybe it's best to match whatever is possible in git-bug core?
Regarding the authentication, there is three different scenario:
Repository.userIdentitycan be nil in GraphQL). In that case we want to have a read-only UI if we don't have a user yet.--read-onlyto force a read-only view.MichaelMure commentedon Feb 1, 2021
So in the react code, the write-enabled part of the UI are guarded with the
IfLoggedIncomponent.claudioantonio commentedon Feb 2, 2021
@MichaelMure I think this issue can be closed. ;-)
claudioantonio commentedon Feb 2, 2021
@MichaelMure I will create a issue to handle specifically this permission question. ;-)