Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Conversation

@remko
Copy link
Contributor

@remko remko commented Apr 4, 2016

Resolves #187

Exposes all transactions except ContentStateInlineStyle and getSampleStateForTesting.

@mitermayer
Copy link
Contributor

Was wondering what is the problem you are trying to solve by having to expose transaction API ? I feel like the least that is exposed the quicker the library to move since it has to maintain less API.

@hellendag
Copy link

I figured these would need to be exposed at some point.

My only concern here is that Modifier does a lot of other work to manage changes to entity ranges, and sidestepping those can lead to trouble.

So for anyone using transaction functions directly, it's a caveat emptor situation. :) But that's okay!

@ericbiewener
Copy link
Contributor

I'll throw my support behind this PR. I have a need for getContentStateFragment.

@christophepas
Copy link

Is this PR will be merged any time soon ? We would need adjustBlockDepthForContentState to be exposed and I'd prefer use it this way than duplicate the code ;)

@hellendag
Copy link

@mitermayer, @flarnie, et al, how do you guys feel about this now? Increasing the exposed API could lead to headaches with API breakage down the road, though I certainly understand the usefulness here -- I assume people are largely hacking around this at this point.

@ericbiewener
Copy link
Contributor

I'm no longer using the function I originally thought I needed access to. I can't remember my use case, but I do recall finding a better way of doing things. Perhaps supporters of this PR should detail their use cases first. Maybe we'll find that there are better approaches for them as well.

@DawnWright
Copy link
Contributor

Is this PR will be merged any time soon ? We would need adjustBlockDepthForContentState to be exposed and I'd prefer use it this way than duplicate the code ;)

We need this exposed as well, so that we can intercept the backspace command and use it to outdent lists (see #187).

@trevtrich
Copy link
Contributor

Any movement on this? We could also use adjustBlockDepthForContentState as some others have noted.

@flarnie
Copy link
Contributor

flarnie commented Sep 29, 2017

Looking at this now, my thought is "not yet". I'll discuss with the other Draft maintainers today, but we have other open bugs and API changes underway, and I'd rather reconsider this once other things are cleaned up.

@flarnie
Copy link
Contributor

flarnie commented Oct 2, 2017

Sorry to close this, but for now my answer is "not yet" - let's wait to expand the API surface of Draft until we fix some of the remaining bugs and add other features that are in the pipeline currently. I would ask folks to continue using the work-around approach described in the issues linked to this PR, or even copy out the modules you need and maintain a fork if you need custom behavior.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants