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

respect classes that folks applied to their embed elements #109

Merged
merged 2 commits into from
May 24, 2022

Conversation

mayakoneval
Copy link
Contributor

@mayakoneval mayakoneval commented May 24, 2022

Previously I had this logic

   Object.assign(element?.style, { height: element?.style.height || '100%' });
    Object.assign(element?.style, { width: element?.style.width || '100%' });

to default to full screen iframe for the embedded Explorer. This only checked if style attributes were set by the user. Folks may set className, and this was overriding their classes, so lets not do anything if they have already set className either.

@changeset-bot
Copy link

changeset-bot bot commented May 24, 2022

🦋 Changeset detected

Latest commit: fa5973e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@apollo/explorer Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codesandbox-ci
Copy link

codesandbox-ci bot commented May 24, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit fa5973e:

Sandbox Source
npm-embeddable-explorer Configuration

@mayakoneval mayakoneval force-pushed the maya/dont-override-user-classNames branch from 1d84b22 to d19e73e Compare May 24, 2022 19:46
@mayakoneval mayakoneval requested a review from cheapsteak May 24, 2022 19:46
Copy link
Member

@cheapsteak cheapsteak left a comment

Choose a reason for hiding this comment

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

🙏

@mayakoneval mayakoneval merged commit a387e0d into main May 24, 2022
@mayakoneval mayakoneval deleted the maya/dont-override-user-classNames branch May 24, 2022 20:24
@github-actions github-actions bot mentioned this pull request May 24, 2022
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