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

Add capability for custom CSS from user side #839

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

milanlakhani
Copy link
Contributor

@milanlakhani milanlakhani commented Aug 8, 2022

This adds an optional config extra_css in settings.yml, which allows extra lines of css to be appended to the end of src/styles.css, from the user end. This is useful because people may being using the landscape in different contexts - eg for Bloomberg, not every filter is applicable so we hide some of them.

The extra_css config can be included in settings.yml in the global section. Below is an example of how this is used for having a selection of filters to not show on the left side:

global:
    extra_css: |
        div.select[data-name="project"] { display: none !important; }
        div.select[data-name="organization"] { display: none !important; }
        div.select[data-name="headquarters"] { display: none !important; }
        div.select[data-name="company-type"] { display: none !important; }
        div.select[data-name="industries"] { display: none !important; }

This is what the home page looks like with and without filters disabled, notice the difference in filters available on the left hand side:

Without any filters disabled:
Screenshot 2022-08-04 at 14 54 41

With some filters disabled:
Screenshot 2022-08-04 at 14 57 47

Of course this is just one example of how extra_css can be used.

CC @michaelmoss @awright @danielsilverstone-ct @GeriG966 @abhi0469

@netlify
Copy link

netlify bot commented Aug 8, 2022

Deploy Preview for landscapeapp ready!

Name Link
🔨 Latest commit 6fd552e
🔍 Latest deploy log https://app.netlify.com/sites/landscapeapp/deploys/62f0ee894fc6d30009ddf745
😎 Deploy Preview https://deploy-preview-839--landscapeapp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Aug 8, 2022

Deploy Preview for landscapeapp failed.

Name Link
🔨 Latest commit 20abf5d
🔍 Latest deploy log https://app.netlify.com/sites/landscapeapp/deploys/6374090c36834f00081a2812

@AndreyKozlov1984
Copy link
Contributor

I want to get a better solution, the list of options will grow too much with this approach, instead I would prefer something like a customCss property where people can, for example, hide filters if they need to or hide other parts of the UI

@milanlakhani
Copy link
Contributor Author

milanlakhani commented Aug 9, 2022

I want to get a better solution, the list of options will grow too much with this approach, instead I would prefer something like a customCss property where people can, for example, hide filters if they need to or hide other parts of the UI

Works for me, I will do a patch with a customCss property from settings.yml so people can make any CSS changes

@milanlakhani
Copy link
Contributor Author

milanlakhani commented Aug 10, 2022

Hi @AndreyKozlov1984 I think and have tested that this now has the desired effect? Also maybe you should consider merging #836 when you get a chance - it's a bugfix that allows landscapes to be run without a crunchbase key, which has been pivotal for us to test our changes on different landscapes.

@AndreyKozlov1984
Copy link
Contributor

@milanlakhani we don't need crunchbase key at this moment, because you can just use organization: { name: 'test'}} for that purpose

@milanlakhani milanlakhani force-pushed the milan/filters branch 2 times, most recently from 9df43a8 to bec6d58 Compare November 14, 2022 16:11
This flag in the global section of settings.yml allows landscapes
to have custom CSS properties set.

Signed-off-by: Milan Lakhani <[email protected]>
@milanlakhani milanlakhani changed the title Add capability to choose filters to hide from left side menu on home page Add capability for custom CSS from user side Nov 16, 2022
@milanlakhani
Copy link
Contributor Author

milanlakhani commented Nov 16, 2022

@AndreyKozlov1984 just to prompt you, this feature is now available as you requested it ;) and description updated

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