Skip to content

List item change to depend on TextRun #232

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

Closed
wants to merge 1 commit into from

Conversation

basjan
Copy link
Contributor

@basjan basjan commented May 10, 2014

Following the issue #230 I have changed the inheritance of ListItem. It now inherits from TextRun, such that it behaves as a container. It is now possible to provide inline formatting of a ListItem.

@ivanlanin: I already appologize for not having my branch full in sync. I am still struggling with Eclipse, Egit and GitHub. I am able to start with a fully synced branch, but when changes are merged in the upstream branch, while I am coding, I am getting out of sync.
Still searching the web for a good tutorial :/

@ivanlanin
Copy link
Contributor

Good proof of concept, @basjan. Our next release is 0.11 (#225), which is a minor version, that will have to maintain compatibility. This changes will break compatibility, i.e. current code using addListItem will produce error because the arguments are changed. So, I can't merge this pull now.

I suggest to create a new element with a different name, e.g. ListRun, and keep ListItem intact. We can merge this two element on 1.0 (#81).

@basjan
Copy link
Contributor Author

basjan commented May 11, 2014

Thanks. I will take a look at it. It does indeed sounds logical if you have Text and TextRun, to also have ListItem and ListItemRun.

@basjan
Copy link
Contributor Author

basjan commented May 11, 2014

Just for my thoughts: A Text element, when added to for example a section, creates in fact a TextRun element with a single Text element inside. This behaviour is in fact a short-cut for first creating a TextRun and adding a single Text element.

The current ListItem element behaviour could also be considered a short-cut for creating a TextRun of a 'special ListType' and adding a single Text element.

When you follow this line of thoughts, then the new element should be named ListItemRun as it will create only a TextRun of the 'special ListType'. Thus ListItemRun extends TextRun. (as was already done in the proof of concept).

@basjan basjan mentioned this pull request May 11, 2014
@basjan basjan closed this May 11, 2014
@basjan basjan deleted the ListItem-change branch May 11, 2014 09:15
@Progi1984 Progi1984 added this to the 0.11.0 milestone May 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants