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

feat: Added defaultOpen Attribute for iframe #302

Merged
merged 2 commits into from
Sep 18, 2023
Merged

Conversation

Itswag
Copy link
Contributor

@Itswag Itswag commented Sep 14, 2023

This commit introduces a new attribute defaultOpen for the iframe created in iframe.js. The defaultOpen attribute allows the iframe to be visible by default when the page loads. This new feature enhances the user experience by providing an option to display the chatbot window immediately after the page is loaded, without requiring user interaction.


<script src="xxx/js/iframe.js" id="fastgpt-iframe"
    data-src="http://xxx/chat/share?shareId=hhe1sbq4tm3iznbvk8k5njr9"
    data-color="#4e83fd"
    data-default-open="true">
</script>

Generated by GPT-4

This commit introduces a new attribute `defaultOpen` for the iframe created in `iframe.js`. The `defaultOpen` attribute allows the iframe to be visible by default when the page loads. This new feature enhances the user experience by providing an option to display the chatbot window immediately after the page is loaded, without requiring user interaction.
@Itswag Itswag temporarily deployed to Preview September 14, 2023 15:00 — with GitHub Actions Inactive
@cla-assistant
Copy link

cla-assistant bot commented Sep 14, 2023

CLA assistant check
All committers have signed the CLA.

@cla-assistant
Copy link

cla-assistant bot commented Sep 14, 2023

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@c121914yu
Copy link
Collaborator

🤖 Generated by deploy action

👀 Visit Preview

@c121914yu
Copy link
Collaborator

image
测试了下,如果 style.visibility 设置在 cssText 上方,会被覆盖掉,需要设置在下方

code standard
@Itswag
Copy link
Contributor Author

Itswag commented Sep 18, 2023

image 测试了下,如果 style.visibility 设置在 cssText 上方,会被覆盖掉,需要设置在下方

如果cssText中包含visibility 属性确实会产生覆盖问题。尽管代码中已经去除了visibility 属性,为了避免产生歧义已经修改到下方位置

@c121914yu
Copy link
Collaborator

后续会在主站增加对应配置项

@c121914yu c121914yu merged commit b8ba947 into labring:main Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants