-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 field mapping step to csv contact import #7045
Conversation
84ba0f4
to
8170b5e
Compare
In new code we should generate HTML with bootstrap/elastic classes and make sure it works in other skins. That change in Elastic should go away completely. |
This might be really over complicated and not practical but what if there was a way for a skin to define default classes for specific HTML elements globally?
Agreed |
I would rather make core to output bootstrap compatible html and make old skins understand that. What I don't like in current Elastic is a lot of code that converts old html structures (tables, forms) programmatically. We should be looking for possibility to get rid of that (and some css that is there only because bootstrap does not like forms based on tables). My point is, it would be better to not make the core php code more complicated. I think we should spend some time in 1.5 on this. 1.4 was "look we can do this and that", but in 1.5 we should optimize Elastic. |
87bddfb
to
c9adad9
Compare
@johndoh do you plan to finish this? Would be nice to have it soon-ish as I plan some refactoring that will make the merge harder. |
I think its done apart from the change in ui.js, I don't know how to solve that. any pointers appreciated. |
Also I added a behavioral change with c9adad9 before information inside the row of a gmail CSV file was used to decide if (e.g.) a phone number was home or work etc but with the mapping screen its by column so type attribute in the row is ignored in favour of what the user specified for the column. This was gmail specific behavior and made user specified mapping impossible and, for me, the user specified mapping is more useful. |
I am all in for optimization. If you point me in the right direction, where you need some optimization I am more then glad to help. |
I was thinking about getting rid as much as possible of bootstrap_style() in ui.js, but that is not a simple task. And that is also what we should do with this change in ui.js, i.e. generate the HTML "bootstrap-style" and make it look good also in other skins. |
@alecpl as you say, this is not simple. just in this case for example to get the correct display a class needs to be set on the thead->tr but setting classes on rows in table headers is not supported by the In my latest commit I've added support for it and removed the changes from ui.js, is this anything like what you had in mind? I have checked that the addition of these classes has no impact on the Classic or Larry skins. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better, and probably good enough for this PR. I'll give it a try the next weekend(s).
In general we should aim for replacing these old structures based on tables with ones based on divs, like Bootstrap does, but this is a lot of work (with BC break for plugins and skins) and I'm not going to work on that in 1.5.
I've rebased and squashed all the commits |
@johndoh there's an error and a failure in tests on PHP 7.4. Could you fix this?
|
failing tests fixed |
And conflicts again, sorry. Could you resolve this? |
done |
importing csv files into the address book can be a little tricky and there are few tickets from confused users asking about column names and things like that so I thought may be a good solution is add an intermediate step into the CSV file import process (does not effect vCards) which shows what Roundcube guessed for the field mapping and give the user the opportunity to change that mapping.
I'm not sure about my addition to Elastic ui.js I think there must be a better way to get the styling of the table header right, any hints?