You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "sampathkrsna829 (via GitHub)" <gi...@apache.org> on 2024/12/03 10:45:14 UTC

[I] CSS Template issue [superset]

sampathkrsna829 opened a new issue, #31269:
URL: https://github.com/apache/superset/issues/31269

   ### Bug description
   
   Under settings when we try to add a new CSS template, The system adds it. 
   But in the same session we try to create a new  CSS template, The previous Template opens up & the modal shows up the data of the earlier created CSS. 
   A quick look up on the network tab shows that the calls is being taken up as an edit and throws an error. 
   
   Attaching the screengrab for reference. 
   
   P.S : The second time the edit is clicked the previous CSS is being pre populated.  
   
   ### Screenshots/recordings
   
   ![image](https://github.com/user-attachments/assets/4be2b3db-23fd-46ae-bd66-146cf0328699)
   
   
   ### Superset version
   
   master / latest-dev
   
   ### Python version
   
   3.9
   
   ### Node version
   
   16
   
   ### Browser
   
   Safari
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
   - [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
   - [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.


-- 
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: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] CSS Template issue [superset]

Posted by "suraj-mandal (via GitHub)" <gi...@apache.org>.
suraj-mandal commented on issue #31269:
URL: https://github.com/apache/superset/issues/31269#issuecomment-2850405194

   I would like to take a look into this issue, if no one is taking


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] CSS Template issue [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #31269:
URL: https://github.com/apache/superset/issues/31269#issuecomment-2835502199

   This is indeed still an issue today. Refreshing clears the state of the page and lets you create a new template, for what it's worth. We're still open to PRs, this seems like a (hopefully) simple fix that nobody has had time for :)


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] CSS Template issue [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #31269:
URL: https://github.com/apache/superset/issues/31269#issuecomment-2523905881

   We don't usually do the "asignee" thing on our general Issues on the repo, but in this case, it's all yours @sahiladit! Thanks in advance.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] CSS Template issue [superset]

Posted by "Vitor-Avila (via GitHub)" <gi...@apache.org>.
Vitor-Avila closed issue #31269: CSS Template issue 
URL: https://github.com/apache/superset/issues/31269


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] CSS Template issue [superset]

Posted by "sahiladit (via GitHub)" <gi...@apache.org>.
sahiladit commented on issue #31269:
URL: https://github.com/apache/superset/issues/31269#issuecomment-2519153062

   Can you assign it to me?


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] CSS Template issue [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #31269:
URL: https://github.com/apache/superset/issues/31269#issuecomment-2514195342

   <!-- Greeting -->
   Hello @sampathkrsna829! I'm here to help you with any bugs, questions, or contributions. Let's work together to resolve this issue.
   
   <!-- Answer -->
   The issue you're experiencing with the CSS template modal in Superset seems to be related to how the state is managed when creating a new template after just having created one. The modal might not be resetting its state properly, causing it to prepopulate with the previous template's data.
   
   Here are a few areas to investigate and potentially address the issue:
   
   1. **State Initialization**: Ensure that the state is correctly reset when opening the modal for a new template creation. The `useEffect` hook should initialize the state with empty fields when not in edit mode <sup>[[1]](https://github.com/apache/superset/blob/master/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx)</sup>.
   
   2. **isEditMode Flag**: Verify that the `isEditMode` flag is correctly set to `false` when opening the modal for creating a new template. This flag determines whether the modal should load existing data or start fresh <sup>[[1]](https://github.com/apache/superset/blob/master/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx)</sup>.
   
   3. **Modal Visibility**: Check the logic controlling the modal's visibility and state reset. The `isHidden` state should be managed to ensure the modal resets its content when closed and reopened <sup>[[1]](https://github.com/apache/superset/blob/master/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx)</sup>.
   
   4. **API Calls**: Ensure that the API calls are correctly differentiated between create and edit operations. The `createResource` function should be called for new templates, and `updateResource` for existing ones <sup>[[1]](https://github.com/apache/superset/blob/master/superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx)</sup>.
   
   Reviewing these areas in the code might help identify why the modal is not resetting as expected. Adjusting the state management logic should resolve the issue of the modal prepopulating with the previous template's data.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org