dosubot[bot] commented on issue #37444:
URL: https://github.com/apache/superset/issues/37444#issuecomment-3798628766

   <!-- Answer -->
   This behavior happens when the Metrics and Columns sections share the same 
folder ID or are nested under the same folder in the panel's configuration. The 
collapse state is managed by a set of folder IDs, so if both sections use the 
same ID, collapsing one will hide both. By default, Metrics and Columns should 
have distinct IDs and independent collapse states, but a custom folder 
configuration or a backend change could cause them to share an ID or parent, 
leading to this issue. You can check the folder structure logic in the frontend 
code (see `transformDatasourceFolders.ts` and `DatasourceItems.tsx`) to ensure 
each section has a unique folder ID and is not nested together. More details on 
the collapse logic are here:  
   
[DatasourceItems.tsx](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/explore/components/DatasourcePanel/DatasourceItems.tsx#L30-L165)
  
   
[transformDatasourceFolders.ts](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/explore/components/DatasourcePanel/transformDatasourceFolders.ts#L28-L152)
   
   If you have a custom folder config or plugin, check that Metrics and Columns 
are not grouped under the same folder or ID. If you are using the default 
config and still see this, it may be a bug in how the folders are constructed 
or IDs assigned. No recent changes or fixes for this behavior were found in the 
main branch.
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/92dcc98c-8287-4e3d-9361-f05d5e862b70?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/92dcc98c-8287-4e3d-9361-f05d5e862b70?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/92dcc98c-8287-4e3d-9361-f05d5e862b70?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/92dcc98c-8287-4e3d-9361-f05d5e862b70?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/92dcc98c-8287-4e3d-9361-f05d5e862b70?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/92dcc98c-8287-4e3d-9361-f05d5e862b70?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/92dcc98c-8287-4e3d-9361-f05d5e862b70?feedback_type=other)</sup>
   
   [![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20behavior%20happens%20when%20the%20Metrics%20and%20Columns%20sections%20share%20the%20same%20folder%20ID%20or%20are%20nested%20under%20the%20same%20folder%20in%20the%20panel%27s%20configuration.%20The%20collapse%20state%20is%20managed%20by%20a%20set%20of%20folder%20IDs%2C%20so%20if%20both%20sections%20use%20the%20same%20ID%2C%20collapsing%20one%20will%20hide%20both.%20By%20default%2C%20Metrics%20and%20Columns%20should%20have%20distinct%20IDs%20and%20independent%20collapse%20states%2C%20but%20a%20custom%20folder%20configuration%20or%20a%20backend%20change%20could%20cause%20them%20to%20share%20an%20ID%20or%20parent%2C%20leading%20to%20this%20issue.%20You%20can%20check%20the%20folder%20structure%20logic%20in%20the%20frontend%20code%20%28see%20%6
 
0transformDatasourceFolders.ts%60%20and%20%60DatasourceItems.tsx%60%29%20to%20ensure%20each%20section%20has%20a%20unique%20folder%20ID%20and%20is%20not%20nested%20together.%20More%20details%20on%20the%20collapse%20logic%20are%20here%3A%20%20%0A%5BDatasourceItems.tsx%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/explore/components/DatasourcePanel/DatasourceItems.tsx%23L30-L165%29%20%20%0A%5BtransformDatasourceFolders.ts%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/explore/components/DatasourcePanel/transformDatasourceFolders.ts%23L28-L152%29%0A%0AIf%20you%20have%20a%20custom%20folder%20config%20or%20plugin%2C%20check%20that%20Metrics%20and%20Columns%20are%20not%20grouped%20under%20the%20same%20folder%20or%20ID.%20If%20you%20are%20using%20the%20default%20config%20and%20still%20see%20this%2C%20it%20may%20be%20a%20bug%20in%20how%20the%20folders%20are%20constru
 
cted%20or%20IDs%20assigned.%20No%20recent%20changes%20or%20fixes%20for%20this%20behavior%20were%20found%20in%20the%20main%20branch.)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/37444)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to