Skip to content

WebUI - allow to create bugs #158

Closed
Closed

Description

@hoijui

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?

Activity

  1. hoijui commented on May 30, 2019

    @hoijui
    ContributorAuthor

    Somewhat related comment in an older issue: #31 (comment)

  2. MichaelMure commented on May 30, 2019

    @MichaelMure
    Contributor

    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.

  3. hoijui commented on May 30, 2019

    @hoijui
    ContributorAuthor

    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?

  4. MichaelMure commented on May 30, 2019

    @MichaelMure
    Contributor

    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.

  5. MichaelMure commented on Oct 24, 2019

    @MichaelMure
    Contributor
  6. cheshirekow commented on Oct 24, 2019

    @cheshirekow
    Contributor

    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 😉.

    add_bug

    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.

  7. hoijui commented on Oct 28, 2019

    @hoijui
    ContributorAuthor

    cool!
    thank you @cheshirekow ! will do next time I get the courage for it.

  8. MichaelMure commented on Feb 12, 2020

    @MichaelMure
    Contributor

    This is actively worked on by @sandhose and @ludovicm67 🎉

  9. claudioantonio commented on Jan 13, 2021

    @claudioantonio
    Contributor

    Hi @MichaelMure , @cheshirekow and @hoijui .
    Any news about this feature? I'm interested to help. ;-)

  10. MichaelMure commented on Jan 14, 2021

    @MichaelMure
    Contributor

    @claudioantonio no one is working on this at the moment, so feel free to take a stab at it! Much appreciated.

  11. claudioantonio commented on Jan 14, 2021

    @claudioantonio
    Contributor

    Ok @MichaelMure . I'll take a look at the work started by @cheshirekow .

  12. claudioantonio commented on Jan 14, 2021

    @claudioantonio
    Contributor

    @MichaelMure to start the backend is cygwin sufficient to exec the makefile?

  13. 3 remaining items

  14. MichaelMure commented on Jan 24, 2021

    @MichaelMure
    Contributor

    That's neat :)

  15. claudioantonio commented on Jan 28, 2021

    @claudioantonio
    Contributor

    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.
    image

    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?
    image

  16. MichaelMure commented on Jan 28, 2021

    @MichaelMure
    Contributor

    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/playground

  17. claudioantonio commented on Jan 28, 2021

    @claudioantonio
    Contributor

    Hi @MichaelMure !
    Wow! I liked the playground a lot. ;-)

    Sorry for the lack of the error message in the last comment.
    image

  18. MichaelMure commented on Jan 28, 2021

    @MichaelMure
    Contributor

    That looks like a HTTP error, maybe looking at the network debugger in your browser would help?

  19. claudioantonio commented on Jan 28, 2021

    @claudioantonio
    Contributor

    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. 😉

  20. changed the title [-]WebUI - allow to create bugs, edit, add comments, ...[/-] [+]WebUI - allow to create bugs[/+] on Jan 29, 2021
  21. MichaelMure commented on Jan 29, 2021

    @MichaelMure
    Contributor

    Done. Feel free to open more issues for the other parts (or straight up a PR :-D)

  22. claudioantonio commented on Jan 29, 2021

    @claudioantonio
    Contributor

    @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? 🤔

  23. added a commit that references this issue on Jan 31, 2021
  24. MichaelMure commented on Feb 1, 2021

    @MichaelMure
    Contributor

    @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:

    • the user might might not have an identity yet (that is, Repository.userIdentity can 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.
  25. MichaelMure commented on Feb 1, 2021

    @MichaelMure
    Contributor

    So in the react code, the write-enabled part of the UI are guarded with the IfLoggedIn component.

  26. claudioantonio commented on Feb 2, 2021

    @claudioantonio
    Contributor

    @MichaelMure I think this issue can be closed. ;-)

  27. claudioantonio commented on Feb 2, 2021

    @claudioantonio
    Contributor

    @MichaelMure I will create a issue to handle specifically this permission question. ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions