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

Refactoring of New Project view in manager dashboard #665

Open
1 of 3 tasks
ofr1tz opened this issue Mar 14, 2023 · 6 comments
Open
1 of 3 tasks

Refactoring of New Project view in manager dashboard #665

ofr1tz opened this issue Mar 14, 2023 · 6 comments

Comments

@ofr1tz
Copy link
Collaborator

ofr1tz commented Mar 14, 2023

As presented in one of the last MapSwipe calls (recoding of the demo: MapSwipe web client demo by HeiGIT from 2023-02-14 community call ), we are currently developing a MapSwipe web client. The web client does not only make it possible to contribute from the browser and thus facilitate access to users who do not use an Android or iOS device or who are not allowed to install apps. It also opens up more possibilities to experiment with new project types. Moreover, we intent to implement more generic versions of the "classic" MapSwipe project type that may help widen the thematic scope of MapSwipe and may be used in crowdmapping projects beyond MapSwipe, in the context of entirely new thematic fields.

At the moment, we use a fork of the old manager dashboard for project creation and management that allows us to create projects of types that are not yet implemented in MapSwipe, and to add project properties that are needed for the more generic versions of the existing MapSwipe project types (e.g. we allow the project creator to define custom answers to BUILD_AREA projects).

However, rather than continuing with our own fork, we aim at integrating our changes to the MapSwipe manager dashboard and thus contribute to its development as well as benefit from the contributions of others.

In order to make it easier to add new project types, we suggest a refactoring of the New Project view of the manager dashboard into separate components for each project type. We would implement this in the following steps:

  • Create a BasicProjectInfoForm component for input fields that are shared among projects of all types and that will be reused in all type specific project creation components, e.g. project topic, project description

  • Create a tileServerForm for input fields regarding tile server (A and possibly B), zoom level etc. that are used for project creation components of projects that are based on image tiles

  • Create separate components for project creation for the different project types

Based on this refactoring as a prerequisite, we would contribute project creation components for our new experimental project types (i.e. either entirely new project types or adapted, more generic versions of existing project types). We also intent to make the manager dashboard configurable in regard to the allowed project types, so that the regular manager dashboard instance would only allow for creation of the project types currently supported by the MapSwipe mobile app, while another manager dashboard instance would enable creation of other project types (and write to a different Firebase instance).

@udaynwa
Copy link

udaynwa commented Mar 16, 2023

@ofr1tz , We looked at the PR. We also looked at the issue. But we do not completely understand the use-case.

From the issue, what we understood is;

  • You are working on the web client for Mapswipe
  • You want to add more type of projects

We have a couple of questions;

  • How does splitting the project form help?
  • Is there going to be multiple instances of Mapswipe?
  • Will be database be shared?
    • If so, we will also need to do modifications on the app, backend, etc

cc @danbjoseph @tnagorra

@ofr1tz
Copy link
Collaborator Author

ofr1tz commented Mar 16, 2023

Thanks a lot for looking into this!

We are indeed working on a web client for MapSwipe with more/different types of projects. Currently, we have implemented:

  • 2 entirely new project types
  • 2 existing MapSwipe project types, but in more generic versions (e.g. the number of answer options, their color representation and their labels can be configured during project creation)

Regarding your questions:
Splitting the project form would help us to avoid endless if-else statements in the ' New Project' view to decide which input fields need to be included based on the selected project type. The more (different versions) of project types with different necessary input fields we add, the more confusing it would certainly get. Therefore, we propose a situation where -- based on the selected project type -- the 'New Project' view calls the respective project-specific input form component. However, as there are a number of input fields that will be used in projects of all types, we propose a BasicProjectInfoForm component that can be reused.

We are planning to use a separate database for the web client and run a separate instance of the manager dashboard for the MapSwipe web app. This is the reason why we want to make the manager dashboard configurable in regard to the allowed project types. Modifications on the mobile app would thus only be necessary if a decision is taken to implement one of the new (web app) project types in the mobile app.

@danbjoseph
Copy link
Member

(@ofr1tz, for background @udaynwa and the team at Togglecorp just finished a lot of work on the manager dashboard)

@masain
Copy link
Collaborator

masain commented Mar 29, 2023

@udaynwa thanks a lot for looking at the PR. Did @ofr1tz answers help to clarify things? We are also happy to set up a call together with @Hagellach37 (and anyone else interested) and give some more background information, if this is helpful?

@udaynwa
Copy link

udaynwa commented Mar 31, 2023

@masain , yes, it looks good to us. We're happy to have a call if need be.

@frozenhelium
Copy link
Contributor

@danbjoseph @Hagellach37 @laurentS Should we merge this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants