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

Hide Get App banner #320

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

Hide Get App banner #320

wants to merge 1 commit into from

Conversation

chrismessina
Copy link
Collaborator

Create a patch that attempts to solve #319.

Create a patch that attempts to solve #319.
@rsms
Copy link
Owner

rsms commented Sep 14, 2016

Facebook's CSS class names are auto-generated and changes pretty often. We've been using React reflection to traverse the UI, to find nodes of interest.

visibility:hidden means that the element still participates in layout (e.g. pushes other elements aside, flexbox resolution, etc). display:none means it's taken out of the tree entirely. visibility is useful for showing and hiding stuff to avoid causing an expensive re-layout and paint. display:none is useful for removing stuff (but not adding it back.)

So you want "display:none" in this case, or just element.parentNode.removeChild(element)

@rsms
Copy link
Owner

rsms commented Sep 14, 2016

In main.js, you can uncomment dumpReactComponents to have a react component tree output into the console. It might help with finding the "top bar"

Then you can do something like

var messageBar = findReactDOMNode({name: "UniqueNameOfComponent"});

If the component is generic, try this function that finds components based on relative "paths":

var messageBar = findReactDOMNodePath([
  'SomeParentComponent',
  'SomeComponent',
  'TheBarComponent'
]);

@rsms
Copy link
Owner

rsms commented Sep 14, 2016

Oh, and the easiest way to test things is "unfortunately" to run the app from source using Xcode. main.js is embedded into the binary image (used to be loaded over the interwebs, but WebKit security constraints changed, no longer allowing loading injected JS remotely. I think.)

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