geosolutions-it / MapStore2

The solution to create and share maps, dashboards, geostories with 3D support on the web. And it is open-source too!
https://mapstore.geosolutionsgroup.com/
Other
498 stars 384 forks source link

React Bootstrap Lib Update #3834

Open tdipisa opened 5 years ago

tdipisa commented 5 years ago

Description

React Bootstrap - Missing doc

Other useful information (optional):

allyoucanmap commented 3 years ago

@tdipisa @giohappy @offtherailz @mbarto @MV88

Conclusion

I think it's not possible to migrate react bootstrap in one move so I propose these steps:

The first step is needed only if we want to move foorward with the next ones anyway it seems sass language it will be used also in the version 5 of bootstrap so I don't think it's a bad idea move to .scss. I was able to make a complete migration of the code during the investigation https://github.com/allyoucanmap/MapStore2/tree/bootstrap-sass

Investigation

The update to react-bootstrap 4 requires to major breaking change for mapstore:

The react bootstrap 4 change some component behaviour and structures:

and remove others components, here some revelant for mapstore:

Here the result with custom styles in scss, bootstrap v4 and react bootrap v1:

image image image image

Here the result with custom styles in scss and react bootrap v1 removing bootstrap style:

Interisting note: it seems the structure of the editor here still there this probably means that we have a lot of custom style that fight against bootstrap

image image image image

allyoucanmap commented 3 years ago

@tdipisa After a discussion we decided to start with the 2 point focalize on every single editor: map viewer, dashboard and geostory and make our custom style. The aim is to isolate as much as possible the custom theme of mapstore from the bootstrap one. If this process will be successfully we could think to migrate to the latest version of bootstrap if it will be still necessary.

alexander-fedorenko commented 2 years ago

update all the component for react-bootstrap https://react-bootstrap.github.io/migrating/ means code refactoring on mapstore

Following spreadsheet could be useful and handy during the process of components migration as it lists all the places where react-bootstrap components are used: https://docs.google.com/spreadsheets/d/1DDyScCv9htif-apZHDhyqP_8qf6UGLBPxj9g7MJ5YI4/edit?usp=sharing