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

Implemented Table, Column and Cell #854

Merged
merged 18 commits into from
Mar 17, 2020
Merged

Implemented Table, Column and Cell #854

merged 18 commits into from
Mar 17, 2020

Conversation

henriette-einstein
Copy link
Contributor

Added

  • Table
  • Column
  • Cell

and some test cases

settings.json Outdated Show resolved Hide resolved
@ggrossetie
Copy link
Member

Overall that's look very good 👍
I left a few comments.

We also maintain an handcrafted TypeScript Definition File: https://github.com/asciidoctor/asciidoctor.js/blob/master/packages/core/types/index.d.ts

So we will need to add the new functions in here too. Let me know if you are not familiar with TypeScript or if you need help to get started. I can also follow-up on your work and add the missing definition in the index.d.ts file.

@henriette-einstein
Copy link
Contributor Author

Sorry, I am not familiar with the TypeScript definition files

@henriette-einstein
Copy link
Contributor Author

@Mogztter I have no idea, why the build

Build / build (ubuntu-latest, 13.x, master) (pull_request)

failed. What can I do?

@ggrossetie
Copy link
Member

Sorry, I am not familiar with the TypeScript definition files

No worries, I will take care of it 👍

I have no idea, why the build
Build / build (ubuntu-latest, 13.x, master) (pull_request)
failed. What can I do?

I think it's an intermittent failure, I might need to slightly increase the timeout. Nothing to worry about but now GitHub actions does not find the commit reference 🤔
Can you please force push to trigger a new build?

@ggrossetie
Copy link
Member

Build is green, nice 🎉
If that's OK with you, I will add commits on top of your work to adjust a few things and add the type definition.

@henriette-einstein
Copy link
Contributor Author

That is fine with me.

@danyill
Copy link

danyill commented Mar 10, 2020

Thanks @henriette-einstein, thanks @Mogztter much appreciated.

* @memberof Cell
*/
Cell.prototype.getColumnPercentageWidth = function () {
return this.getAttribute('colpcwidth')
Copy link
Member

Choose a reason for hiding this comment

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

@mojavelinux How do you feel about these utilities functions to "quickly" access the underlying attribute?

*/
Table.prototype.hasAutowidthOption = function () {
var autowidthOption = this.getAttributes()['autowidth-option']
return autowidthOption === Opal.nil ? false : autowidthOption === ''
Copy link
Member

Choose a reason for hiding this comment

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

@mojavelinux I'm always a bit concerned that someone could use setAttribute with a boolean value:

table.setAttribute('autowidth-option', true)
table.hasAutowidthOption() // false?!

Do we need to check if the value is truthy instead?

Suggested change
return autowidthOption === Opal.nil ? false : autowidthOption === ''
return autowidthOption === Opal.nil ? false : autowidthOption

@ggrossetie
Copy link
Member

I did a little cleanup, it's looking very good.
I want to hear Dan's opinion on a few specific cases and then I think we will be ready to move forward!

Thanks again for the heavy lifting 💪

@henriette-einstein
Copy link
Contributor Author

henriette-einstein commented Mar 11, 2020

Thanks for the great project. You did the heavy work! I'll add some more test cases and will commit in a few minutes

@ggrossetie
Copy link
Member

Thanks for the great project. You did the heavy work!

😊
Then a team effort!

I'll add some more test cases and will commit in a few minutes

Perfect 👌

@ggrossetie
Copy link
Member

I've rebased on master (force-push), added the TypeScript definitions and a changelog.
I've also fix a few inconsistencies/differences.
It should be ready to go!

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.

None yet

3 participants