Skip to content
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

Refactor large components #108

Closed
sjha2048 opened this issue Jul 14, 2021 · 9 comments · Fixed by #211 or #219 · May be fixed by #179
Closed

Refactor large components #108

sjha2048 opened this issue Jul 14, 2021 · 9 comments · Fixed by #211 or #219 · May be fixed by #179
Assignees
Labels
enhancement New feature or request

Comments

@sjha2048
Copy link
Collaborator

Description

There are several components which needs to be refactored/broken into smaller components

@sjha2048 sjha2048 added the enhancement New feature or request label Jul 14, 2021
@DawnArchi01
Copy link

DawnArchi01 commented Jan 31, 2022

Hey @sjha2048 , I would like to know more on the issue .

@Raunakk02
Copy link

Hi @sjha2048 @Shruti3004, If no one's working on this issue then can I take this up? There are many open issues on this repo and many people have already commented for taking up the issues. But as of now, those requests are pretty old and still, no one has been assigned to the issue. So please let me know if the project is still accepting contributors.

@mcjaeger
Copy link
Member

mcjaeger commented Mar 8, 2022

hi @Raunakk02, indeed if there is no working on the issue, your contribution is welcome. Please keep in mind that refactoring can be difficult to describe, maybe that way a reason for @sjha2048 to hesitate answering.

@Raunakk02
Copy link

Thanks for the response @mcjaeger. Really appreciate it!
I will start working on this issue now.

@sjha2048
Copy link
Collaborator Author

sjha2048 commented Mar 8, 2022

Hi @Raunakk02, sorry somehow I missed your reply.

feel free to take up this issue and reach out to me in case of any issues/discussions, for now, I'll assign this to you.

@mcjaeger
Copy link
Member

mcjaeger commented Mar 8, 2022

Hi, in case you would have the time, maybe consider outlining what your plans are? So we could give feedback and adjust in case. By that approach you re avoiding to work on a PR for a long time alone and then publish something which overlooked one thing in the beginning.

@Raunakk02
Copy link

Sure @mcjaeger, I'll let you know about my plans once I am done outlining them.

@Raunakk02
Copy link

Raunakk02 commented Mar 9, 2022

@mcjaeger @sjha2048 Here is the outline of the work that I am planning to do for the PR targeting this issue.

Refactoring outline

  • src/components/

    • BrowseUploadsHeader:

      • The <Link></Link> componenent can be taken out as a separate component.
    • Header:

      • The <Nav.Link></Nav.Link> componenent can be taken out as a separate component -> (not much impact on the file size)
      • The <NavDropdown></NavDropdown> componenents can be taken out as a separate component -> (Major impact on file size).
        Routes and Names for <NavDropdown.Item></NavDropdown.Item> can be loaded from a map present in an external .js file thereby further reducing the file size.
      • The nested <DropdownButton></DropdownButton> in some NavDropdown.Item can also be extracted as a separate component.
    • Table:

      • The <div className="paginationTable"> can be extracted out as a separate component.
    • Upload\CommonFields:

      • The UploadReuse component contains two different groups of <InputContainer> namely select type and Checkbox type which can be efficiently refactored into two separate components.
  • src/pages/

    This folder also contains many components that can be refactored like Admin/Users/Delete, Browse, Jobs/ScheduleAgents but instead of creating a bulk PR, I'll be just focusing on refactoring the files present in the src/components folder.

Please let me know your views on this.

@sjha2048
Copy link
Collaborator Author

Hi @Raunakk02 Thank you for the pull request, I'll drop my review soon.

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