Skip to content

Feat(Bio Inventory): Add Bio Inventory Layer - #182

Merged
arnaudfnr merged 16 commits into
mainfrom
arnaudfnr/feat-add_bio_inventory
Jul 19, 2026
Merged

Feat(Bio Inventory): Add Bio Inventory Layer#182
arnaudfnr merged 16 commits into
mainfrom
arnaudfnr/feat-add_bio_inventory

Conversation

@arnaudfnr

Copy link
Copy Markdown
Collaborator

No description provided.

@arnaudfnr
arnaudfnr force-pushed the arnaudfnr/fix-indicators branch from 186c3b5 to 693d37a Compare July 8, 2026 11:18
@arnaudfnr
arnaudfnr force-pushed the arnaudfnr/feat-add_bio_inventory branch from c5ce527 to fc3279d Compare July 9, 2026 23:16
@arnaudfnr
arnaudfnr force-pushed the arnaudfnr/fix-indicators branch 2 times, most recently from 58a40e0 to 2dabde8 Compare July 13, 2026 12:49
Base automatically changed from arnaudfnr/fix-indicators to main July 13, 2026 12:53
@arnaudfnr
arnaudfnr force-pushed the arnaudfnr/feat-add_bio_inventory branch 2 times, most recently from b403b84 to 8b7236a Compare July 13, 2026 13:49
@arnaudfnr
arnaudfnr marked this pull request as ready for review July 13, 2026 13:51
@arnaudfnr
arnaudfnr force-pushed the arnaudfnr/feat-add_bio_inventory branch from 8b7236a to 6d5a04f Compare July 16, 2026 06:48
Comment on lines +57 to +65
let chartConfig: ChartConfig = {};
chartData.forEach((element) => {
chartConfig = {
...chartConfig,
[element.name]: {
label: element.name,
},
};
});

@david-bretaud-dev david-bretaud-dev Jul 18, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use reduce here

const chartConfig = chartData.reduce((acc, element) => {
  return {
    ...acc,
    [element.name]: { label: element .name } 
  }
}, { } as ChartConfig);

@@ -1,24 +1,24 @@
import type { LabelData } from "@entities/data";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be good to add to the biome config the entities in the organizeImports below features (I arranged the imports regarding FSD orga)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"organizeImports": {
          "level": "on",
          "options": {
            "groups": [
              [
                ":PACKAGE:",
                ":NODE:",
                ":PACKAGE_WITH_PROTOCOL:",
                ":BUN:",
                "!@app/**",
                "!@pages/**",
                "!@widgets/**",
                "!@features/**",
                "!@entities/**",
                "!@shared/**",
                "!@lib/**",
                "!@i18n",
                "!@ui/**"
              ],
              ":BLANK_LINE:",
              [":ALIAS:", "@/**"],
              "@app/**",
              ":BLANK_LINE:",
              "@pages/**",
              ":BLANK_LINE:",
              "@widgets/**",
              ":BLANK_LINE:",
              "@features/**",
              ":BLANK_LINE:",
              "@entities/**",
              ":BLANK_LINE:",
              "@shared/**",
              "@lib/**",
              "@i18n",
              ":BLANK_LINE:",
              "@ui/**",
              ":BLANK_LINE:",
              ":PATH:"
            ]
          }
        },

Comment thread webapp/src/entities/resources.ts Outdated
@@ -0,0 +1,16 @@
import { LAYERS } from "../shared/api/layers";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { LAYERS } from "../shared/api/layers";
import { LAYERS } from "@shared/api/layers";

@@ -0,0 +1 @@
export { useBioInventoryIndicatorElements as useBiodiversityIndicatorElements } from "./use-bioinventory-indicator-elements";

@david-bretaud-dev david-bretaud-dev Jul 18, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmmmh I would rename when importing (on the consumer side), not exporting, it feels a bit weird to not follow its feature naming

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah it 's just automatic when renaming a component...

mapApiRef.current.setLayerSymbol({
iconSize: getIconSize({}),
layerId: LAYERS.INVENTORY_BIO,
svg: pictoInventaire,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a different picto would be nice ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it , should be better now :)

@david-bretaud-dev david-bretaud-dev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job ! Smallish improvements comments 🚀

@arnaudfnr
arnaudfnr force-pushed the arnaudfnr/feat-add_bio_inventory branch from 4618fb2 to e7e5607 Compare July 19, 2026 07:10
@arnaudfnr
arnaudfnr merged commit 1611037 into main Jul 19, 2026
5 checks passed
@arnaudfnr
arnaudfnr deleted the arnaudfnr/feat-add_bio_inventory branch July 19, 2026 15:21
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

Successfully merging this pull request may close these issues.

2 participants