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

[wip] [feat] Add style overrides and override whitelist #1

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mrderyk
Copy link
Contributor

@mrderyk mrderyk commented Jan 8, 2024

CONTEXT

Users need to be able to override certain styles of the search component.

style_overrides

CHANGES

  • Add whitelist of CSS styles that can be overridden
  • Create type that accepts CSS styles for specific portions of the search component UI
  • Apply CSS styles to corresponding elements

@mrderyk mrderyk marked this pull request as draft January 8, 2024 23:41
@mrderyk mrderyk changed the title [feat] Add style overrides and override whitelist [wip] [feat] Add style overrides and override whitelist Jan 8, 2024
@@ -1,2 +1,3 @@
/node_modules
/dist
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added this to remove the noise around building the packages.
We can always build prior to publishing, without including the built files in the repo.

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense! Might be better to extract it into a separate PR to uncouple the changes?

fontSize?: string;
height?: string;
padding?: string;
};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These seemed to make the most sense to me, but we can add/remove as we see fit. What this allow-list lets us do is ensure that critical styles (i.e. the ones that maintain the general structure and positioning that we intend for the component) cannot be broken.

@mrderyk mrderyk added the bug Something isn't working label Jan 9, 2024
Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

Is the intention here to provide consumers with a simpler interface for implementing a coarse-grained customization of the appearance of the search component? For example, simply using the same font-family as the host site/app or applying a color scheme that's consistent with that of the host site/app.

And is the expectation that if the consumer wants finer-grained control over the styles then they'll define those styles as overrides in the host site/app's CSS layer?

@@ -1,6 +1,6 @@
{
"name": "@vectara/search",
"version": "0.1.0",
"version": "0.1.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should hold off on incrementing version numbers until we're ready for a release. I'd suggest leaving it at 0.0.0 until we're ready for an initial release, which may be 1.0.0 if we're confident in its public use or 0.0.1. if we want to do some internal or limited testing first.

@@ -1,2 +1,3 @@
/node_modules
/dist
Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense! Might be better to extract it into a separate PR to uncouple the changes?

@mrderyk mrderyk removed the bug Something isn't working label Jan 9, 2024
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